#P31B. Sysadmin Bob
Sysadmin Bob
描述
Berland的电子邮件地址是一个形如A@B的字符串,其中A和B是由小写拉丁字母组成的任意字符串。
Bob是«Bersoft»公司的系统管理员。他保留了公司员工的电子邮件地址列表。这个列表是一个大字符串,其中所有地址按任意顺序写在一起,用逗号分隔。同一个地址可能被重复写多次。
突然间,由于未知原因,Bob列表中的所有逗号都消失了。现在Bob有一个字符串,其中所有地址都在一起,没有任何分隔符,无法确定地址之间的边界。不幸的是,在同一天,他的老板要求他带来地址的最初列表。现在Bob想要以一种有效的方式将地址分离。帮助他做到这一点。
输入
第一行包含没有分隔符的地址列表。该字符串的长度在1到200之间,包括边界。该字符串仅由小写拉丁字母和字符«@»组成。
输出
如果没有一个有效的(符合Berland规则)的电子邮件地址列表,使得移除所有逗号后与给定字符串一致,则输出No solution。在其他情况下,输出该列表。在此列表中,可以多次写入相同的地址。如果有多个解决方案,则输出任何一个都可以。
示例
a@aa@a
a@a,a@a
a@a@a
No solution
@aa@a
No solution
Description
Email address in Berland is a string of the form A@B, where A and B are arbitrary strings consisting of small Latin letters.
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.
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.
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 «@».
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.
Input
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 «@».
Output
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.
Samples
a@aa@a
a@a,a@a
a@a@a
No solution
@aa@a
No solution