系统管理员 BobAI (CI翻译)
Email address in Berland is a string of the form $*A*$@$*B*$, where $*A*$ and $*B*$ are arbitrary strings consisting of small Latin letters.
电子邮箱地址在 Berland 中是形如 $*A*$@$*B*$ 的字符串,其中 $*A*$ 和 $*B*$ 是仅由小写拉丁字母组成的任意字符串。AI (CI翻译)
Bob is a system administrator in «Bersoft» company. He keeps a list of email addresses of the company's staff. This list is as a large string, where all addresses are written in arbitrary order, separated by commas. The same address can be written more than once.
Bob 是「Bersoft」公司的一名系统管理员。他保存着一份公司员工的电子邮箱地址列表。这份列表是一个很长的字符串,其中所有地址以任意顺序排列,并用逗号分隔。同一个地址可以出现多次。AI (CI翻译)
Suddenly, because of unknown reasons, all commas in Bob's list disappeared. Now Bob has a string, where all addresses are written one after another without any separators, and there is impossible to determine, where the boundaries between addresses are. Unfortunately, on the same day his chief asked him to bring the initial list of addresses. Now Bob wants to disjoin addresses in some valid way. Help him to do that.
突然,由于某种未知原因,Bob 列表中的所有逗号都消失了。现在 Bob 得到的是一个字符串,其中所有地址首尾相接地排列在一起,没有任何分隔符,因此无法确定地址之间的边界。不幸的是,就在同一天,他的上司要求他带来最初的地址列表。现在 Bob 想要以某种合法的方式拆分这些地址。请帮助他完成这项工作。AI (CI翻译)
Input
输入格式
AI (CI翻译)The first line contains the list of addresses without separators. The length of this string is between $1$ and $200$, inclusive. The string consists only from small Latin letters and characters «@».
第一行包含不带分隔符的地址列表。该字符串的长度在 $1$ 到 $200$ 之间(含端点)。字符串仅由小写拉丁字母和字符「@」组成。AI (CI翻译)
Output
输出格式
AI (CI翻译)If there is no list of the valid (according to the Berland rules) email addresses such that after removing all commas it coincides with the given string, output No solution. In the other case, output the list. The same address can be written in this list more than once. If there are several solutions, output any of them.
如果不存在一个由合法地址组成的列表(合法性遵循 Berland 的规则),使得删除其中所有逗号后得到的字符串与给定字符串完全相同,则输出 No solution。否则,输出该列表。同一个地址可以在列表中出现多次。如果有多个解,输出任意一个即可。AI (CI翻译)
样例
a@aa@a
a@a,a@a
a@a@a
No solution
@aa@a
No solution
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。