{"problem":{"name":"Atcoder Handles","description":{"content":"Mr.X, who the handle name is $T$, looked at the list which written $N$ handle names, $S_1, S_2, ..., S_N$.   But he couldn't see some parts of the list. Invisible part is denoted `?`.      Please calc","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"s8pc_4_a"},"statements":[{"statement_type":"Markdown","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.\n\n## Input\n\nThe 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$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"s8pc_4_a","tags":[],"sample_group":[],"created_at":"2026-03-03 11:01:14"}}