s = gets.chomp c = s.chars.tally.min[0] puts("#{s.chars.find_index(c) + 1} #{c}")