def seconds_to_string(seconds):
    """
    Convert run seconds into string representation
    :param seconds: Number of seconds
    :type seconds: int
    :return: String in the format of 'Xd Xh Xm Xs' based on the provided elapsed time
    :rtype: string
    """
    day = int(seconds // (24 * 3600))
    time_mod = seconds % (24 * 3600)
    hour = int(time_mod // 3600)
    time_mod %= 3600
    minute = int(time_mod // 60)
    seconds = int(time_mod % 60)

    if day > 0:
        res = "{}d {}h {}m {}s".format(day, hour, minute, seconds)
    elif hour > 0:
        res = "{}h {}m {}s".format(hour, minute, seconds)
    elif minute > 0:
        res = "{}m {}s".format(minute, seconds)
    else:
        res = "{}s".format(seconds)

    return res