CF94A.Restoring Password

普及/提高-

通过率:0%

AC君温馨提醒

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

题目描述

Igor K. always used to trust his favorite Kashpirovsky Antivirus. That is why he didn't hesitate to download the link one of his groupmates sent him via QIP Infinium. The link was said to contain "some real funny stuff about swine influenza". The antivirus had no objections and Igor K. run the flash application he had downloaded. Immediately his QIP Infinium said: "invalid login/password".

Igor K. entered the ISQ from his additional account and looked at the info of his main one. His name and surname changed to "H1N1" and "Infected" correspondingly, and the "Additional Information" field contained a strange-looking binary code 8080 characters in length, consisting of zeroes and ones. "I've been hacked" — thought Igor K. and run the Internet Exploiter browser to quickly type his favourite search engine's address.

Soon he learned that it really was a virus that changed ISQ users' passwords. Fortunately, he soon found out that the binary code was actually the encrypted password where each group of 1010 characters stood for one decimal digit. Accordingly, the original password consisted of 88 decimal digits.

Help Igor K. restore his ISQ account by the encrypted password and encryption specification.

输入格式

The input data contains 1111 lines. The first line represents the binary code 8080 characters in length. That is the code written in Igor K.'s ISQ account's info. Next 1010 lines contain pairwise distinct binary codes 1010 characters in length, corresponding to numbers 0, 1, ..., 9.

输出格式

Print one line containing 88 characters — The password to Igor K.'s ISQ account. It is guaranteed that the solution exists.

输入输出样例

  • 输入#1

    01001100100101100000010110001001011001000101100110010110100001011010100101101100
    0100110000
    0100110010
    0101100000
    0101100010
    0101100100
    0101100110
    0101101000
    0101101010
    0101101100
    0101101110
    

    输出#1

    12345678
    
  • 输入#2

    10101101111001000010100100011010101101110010110111011000100011011110010110001000
    1001000010
    1101111001
    1001000110
    1010110111
    0010110111
    1101001101
    1011000001
    1110010101
    1011011000
    0110001000
    

    输出#2

    30234919
    
首页