{"raw_statement":[{"iden":"problem statement","content":"Mr.X, who the handle name is $T$, looked at the list which written $N$ handle names, $S_1, S_2, ..., S_N$.  \nBut he couldn't see some parts of the list. Invisible part is denoted `?`.  \n  \nPlease calculate all possible index of the handle name of Mr.X when you sort $N+1$ handle names ($S_1, S_2, ..., S_N$ and $T$) in lexicographical order.  \nNote: If there are pair of people with same handle name, either one may come first."},{"iden":"input","content":"The input is given from standard input in the following format.  \n\n$N$\n$S_1$\n$S_2$\n :\n$S_N$\n$T$"},{"iden":"sample input 1","content":"2\ntourist\npetr\ne"},{"iden":"sample output 1","content":"1"},{"iden":"sample output 2","content":"1 2 3\n\nIf `?o?r?s?` is `tourist`, and `?et?` is `petr`, the sorted handle names are `e`, `petr`, `tourist`, so `e` comes first.  \nIf `?o?r?s?` is `aobrcsd`, and `?et?` is `petr`, the sorted handle names are `aobrcsd`, `e`, `petr`, so `e` comes second.  \nIf `?o?r?s?` is `aobrcsd`, and `?et?` is `dete`, the sorted handle names are `aobrcsd`, `dete`, `e`, so `e` comes third.  \nSo all indexes are possible."},{"iden":"sample output 3","content":"1 2 3 4 5\n\nIf people have same handle name, which one may come first."},{"iden":"sample output 4","content":"6"},{"iden":"sample output 5","content":"7"},{"iden":"sample output 6","content":"1 2 3 4 5 6 7"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}