#include using namespace std; int main(){ int a,b;char c; cin>>a>>c>>b; if(b+5 > 59){ a=(a+1)%24; b-=55; }else{ b += 5; } cout << a << c << b << endl; }