#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
int d1, d2;
string ps;
bool is_palindrome(int a, int b) {
  string s1 = to_string(a), s2 = to_string(b);
  if (s1.size() == 1) {
    s1 = "0" + s1;
  }
  if (s2.size() == 1) {
    s2 = "0" + s2;
  }
  string s = s2;
  reverse(s.begin(), s.end());
  if (s == s1) {
    cout << s1 << ":" << s2 << "\n";
    return true;
  }
  return false;
}
void get_digit(string s) {
  string s1 = s.substr(0, 2), s2 = s.substr(3, s.size());
  int a1 = 0, a2 = 0;
  a1 = (s1[1] - '0') * 1 + (s1[0] - '0') * 10;
  a2 = (s2[1] - '0') * 1 + (s2[0] - '0') * 10;
  d1 = a1;
  d2 = a2;
}
void solve() {
  string s;
  cin >> s;
  get_digit(s);
  ;
  while (true) {
    d2 += 1;
    if (d2 == 60) {
      d2 = 0;
      d1 += 1;
      if (d1 == 24) {
        d1 = 0;
      }
    };
    if (is_palindrome(d1, d2)) {
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) solve();
  return 0;
}
