def fancy_string_time_from_seconds(input_seconds):
    """
        It converts a time in seconds into a string that is beautiful to read

        Args:
            input_seconds:  time in seconds

        Returns:
            a fancy string like 1h 21m 42s
    """
    try:
        input_seconds = float(input_seconds)
    except ValueError:
        return input_seconds
    minutes, seconds = divmod(input_seconds, 60)
    hours, minutes = divmod(minutes, 60)
    if hours > 0:
        return '%dh %dm %02ds' % (hours, minutes, seconds)
    if minutes > 0:
        return '%dm %02ds' % (minutes, seconds)
    return '%.2fs' % seconds
