#include <bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int N = S.size();
  map<char, vector<int>> mp;
  for (int i = 0; i < N; i++){
    mp[S[i]].push_back(i);
  }
  for (auto &P : mp){
    if (P.second.size() == 1){
      cout << P.second[0] + 1 << ' ' << P.first << endl;
    }
  }
}