#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a = 0, b = 0, c = 0, d = 0;
  stringstream ss;
  cin >> s;
  ss << s[0];
  ss >> a;
  ss.clear();
  ss << s[1];
  ss >> b;
  ss.clear();
  ss << s[3];
  ss >> c;
  ss.clear();
  ss << s[4];
  ss >> d;
  ss.clear();
  while (true) {
    d++;
    if (d == 10 && c == 5 && b == 3 && a == 2) {
      b = 0;
      a = 0;
      c = 0;
      d = 0;
    } else if (d == 10 && c == 5) {
      d = 0;
      c = 0;
      b++;
    } else if (d == 10) {
      d = 0;
      c++;
    }
    if (b == 10) {
      b = 0;
      a++;
    }
    if (a == d && b == c) {
      cout << a << b << ":" << c << d;
      return 0;
    }
  }
  return 0;
}
