#include <bits/stdc++.h>
using namespace std;
bool judge(string s) {
  if (s[0] == s[4] && s[1] == s[3])
    return true;
  else
    return false;
}
string change(string s) {
  int num = (s[0] - '0') * 10 + s[1] - '0';
  num *= 60;
  num += (s[3] - '0') * 10 + s[4] - '0';
  num++;
  if (num == 1440) num = 0;
  int x = num / 60;
  int y = num % 60;
  string p = "";
  p += x / 10 + '0';
  p += x % 10 + '0';
  p += ":";
  p += y / 10 + '0';
  p += y % 10 + '0';
  return p;
}
int main() {
  string s;
  cin >> s;
  while (1) {
    s = change(s);
    if (judge(s)) {
      cout << s << endl;
      break;
    }
  }
  return 0;
}
