#include<iostream>
using namespace std;

int main(){
    int H,M,S;
    cin>>H>>M>>S;

    S=S+1;
    if(S==60){
        S=0;
        M++;
    }
    if(M==60){
        M=0;
        H++;
    }
    if(H==24){
        H=0;
    }

    // wypisuje H
    if(H<10){
        cout<<"0"<<H;
    } else{
        cout<<H;
    }
    cout<<":";
    // wypisuje M
    if(M<10){
        cout<<"0"<<M;
    } else{
        cout<<M;
    }
    cout<<":";
        // wypisuje S
    if(S<10){
        cout<<"0"<<S;
    } else{
        cout<<S;
    }
    return 0;
}
