#include <stdio.h>

int main() {
    int hour, minute, second;
    
    scanf("%d:%d:%d", &hour, &minute, &second);
    
    second++;

    if (second >= 60) {
        second = 0;
        minute++;

        if (minute >= 60) {
            minute = 0;
            hour++;

            if (hour >= 24) {
                hour = 0;
            }
        }
    }
    
    printf("%02d:%02d:%02d\n", hour, minute, second);
    
    return 0;
}
