from itertools import*a=input()c=lambda:[i for i in product(a,a[1:])if sum(i)==10]d=c()while d:print d[0];[a.remove(j)for j in d[0]];d=c()
Standard input is empty
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!