fork(2) download
  1. x = int(input())
  2. i = 0
  3. while i < x:
  4. i+=1
  5. y = input().upper()
  6. for alf in sorted(set(y)):
  7. if y.count(alf) <=2:
  8. print(alf*y.count(alf),sep="",end="")
  9. else:
  10. print(alf,y.count(alf),sep="",end="")
  11. print()
Runtime error #stdin #stdout #stderr 0.11s 23592KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line