#include using namespace std; using ll = long long; const int INF = 1e+9; const ll LINF = (ll)pow(10,18); int main(){ string s; cin >> s; string t; int idx = 1e+9; if(s.size() < 4){ cout << -1 << endl; return 0; } for(int i=0; i