Problem E
Distinct Subsequences
Input:
standard input