#include using namespace std; typedef long long ll; int main(){ string s; cin >> s; map mp; for(int i = 0;i < s.size();i++)mp[s[i]]++; char ans; for(auto i:mp)if(i.second == 1)ans = i.first; ll num = 0; for(int i = 0;i < s.size();i++){ if(s[i] == ans)num = i; } cout << num + 1 << " " << ans << endl; }