301309: CF245B. Internet Address

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Internet Address

题意翻译

Vasya 在学校上信息课时发现了一个很有意思的网站,并把他记录了下来。然而,他实在是太粗心了,以至于等到他回到家才发现,他写下的网址没有打标点符号,只有由一大堆英文字母组成的字符串! Vasya 只记得,他想要写下的网址的格式是 `<protocol>://<domain>.ru[/<context>]`,其中: - `<protocol>` 可以是 `http`,也可以是 `ftp`。 - `<domain>` 是一个由小写字母构成的非空字符串。 - `/<context>` 可有可无。如果有这一部分的话,那么 `<context>` 是一个由小写字母构成的非空字符串。 现在,Vasya 会告诉你他写下的字符串 $s$,请你帮助 Vasya 还原出这个网址。如果有多个网址符合要求,你只需要告诉 Vasya 任意一个符合要求的网址即可。 数据范围:$|s|\leqslant 50$。 Translated by Eason_AC

题目描述

Vasya is an active Internet user. One day he came across an Internet resource he liked, so he wrote its address in the notebook. We know that the address of the written resource has format: <protocol>://<domain>.ru\[/<context>\]where: - <protocol> can equal either "http" (without the quotes) or "ftp" (without the quotes), - <domain> is a non-empty string, consisting of lowercase English letters, - the /<context> part may not be present. If it is present, then <context> is a non-empty string, consisting of lowercase English letters. If string <context> isn't present in the address, then the additional character "/" isn't written. Thus, the address has either two characters "/" (the ones that go before the domain), or three (an extra one in front of the context). When the boy came home, he found out that the address he wrote in his notebook had no punctuation marks. Vasya must have been in a lot of hurry and didn't write characters ":", "/", ".". Help Vasya to restore the possible address of the recorded Internet resource.

输入输出格式

输入格式


The first line contains a non-empty string that Vasya wrote out in his notebook. This line consists of lowercase English letters only. It is guaranteed that the given string contains at most 50 letters. It is guaranteed that the given string can be obtained from some correct Internet resource address, described above.

输出格式


Print a single line — the address of the Internet resource that Vasya liked. If there are several addresses that meet the problem limitations, you are allowed to print any of them.

输入输出样例

输入样例 #1

httpsunrux

输出样例 #1

http://sun.ru/x

输入样例 #2

ftphttprururu

输出样例 #2

ftp://http.ru/ruru

说明

In the second sample there are two more possible answers: "ftp://httpruru.ru" and "ftp://httpru.ru/ru".

Input

题意翻译

Vasya 在学校上信息课时发现了一个很有意思的网站,并把他记录了下来。然而,他实在是太粗心了,以至于等到他回到家才发现,他写下的网址没有打标点符号,只有由一大堆英文字母组成的字符串! Vasya 只记得,他想要写下的网址的格式是 `<protocol>://<domain>.ru[/<context>]`,其中: - `<protocol>` 可以是 `http`,也可以是 `ftp`。 - `<domain>` 是一个由小写字母构成的非空字符串。 - `/<context>` 可有可无。如果有这一部分的话,那么 `<context>` 是一个由小写字母构成的非空字符串。 现在,Vasya 会告诉你他写下的字符串 $s$,请你帮助 Vasya 还原出这个网址。如果有多个网址符合要求,你只需要告诉 Vasya 任意一个符合要求的网址即可。 数据范围:$|s|\leqslant 50$。 Translated by Eason_AC

加入题单

算法标签: