#include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 998244353; signed main() { ios::sync_with_stdio(false); cin.tie(0); string S; cin >> S; mapmp; for (int i = 0; i < S.size(); i++) { mp[S[i]]++; } for (int i = 0; i < S.size(); i++) { if (mp[S[i]] == 1) { cout << i + 1 << " " << S[i] << endl; return 0; } } return 0; }