#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  char s;
  cin >> a >> s >> b;
  do {
    b++;
    if (b == 60) {
      ++a;
      b = 0;
    }
    if (a == 24) {
      a = 0;
    }
  } while (a % 10 * 10 + a / 10 != b);
  if (a == 0 && b == 0)
    cout << "00:00" << endl;
  else if (a < 10 && b < 10) {
    cout << "0" << a << ":"
         << "0" << b << endl;
  } else if (a >= 10 && b >= 10)
    cout << a << ":" << b << endl;
  else if (a < 10 && b >= 10)
    cout << "0" << a << ":" << b << endl;
  else if (a >= 10 && b <= 10)
    cout << a << ":"
         << "0" << b << endl;
  return 0;
}
