CF31B.Sysadmin Bob

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Email address in Berland is a string of the form AA @ BB , where AA and BB 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 11 and 200200 , 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.

输入输出样例

  • 输入#1

    a@aa@a
    

    输出#1

    a@a,a@a
    
  • 输入#2

    a@a@a
    

    输出#2

    No solution
    
  • 输入#3

    @aa@a
    

    输出#3

    No solution
    
首页