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.

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

#include<stdio.h>
#include<string.h>
int main(void)
{
    int i;
    char c[50];
    gets(c);
    if(c[0]=='h')
    {
        printf("http://");
        printf("%c",c[4]);
        for(i=5;i<strlen(c);i++)
        {
            if(c[i]=='r'&&c[i+1]=='u')break;
            else printf("%c",c[i]);
        }
        printf(".ru");
        if(i==strlen(c)-2);
        else
        {
            printf("/");
            for(i=i+2;i<strlen(c);i++)printf("%c",c[i]);
        }
    }
    else if((c[0]=='f'))
    {
        printf("ftp://");
        printf("%c",c[3]);
        for(i=4;i<strlen(c);i++)
        {
            if(c[i]=='r'&&c[i+1]=='u')break;
            else printf("%c",c[i]);
        }
        printf(".ru");
        if(i==strlen(c)-2);
        else
        {
            printf("/");
            for(i=i+2;i<strlen(c);i++)printf("%c",c[i]);
        }
    }
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void strcatchar(char *principio,char texto);
void link(char texto[51],char principio[56]);
int buscarru(char *texto);

int main ()
{
    char texto[51];
    scanf("%s",texto);
    texto[50]='\0';
    char texto2[56]="";
    link(texto,texto2);
    printf("%s",texto2);
    return 0;
}

void link(char texto[51], char principio[56])
{
    int i,largo;
    largo=strlen(texto);
    if(texto[0]=='h')
    {
        strncpy(principio,texto,4);
        i=4;
    }
    else if(texto[0]=='f')
    {
        strncpy(principio,texto,3);
        i=3;
    }
    strcat(principio,"://");
    int pos;
    pos=buscarru(texto);
    for(i;i<pos;i++)
    {
        strcatchar(principio,texto[i]);
    }
    strcat(principio,".ru");
    i=i+2;
    if(i<largo)
        strcatchar(principio,'/');
    for(i;i<largo;i++)
    {
        strcatchar(principio,texto[i]);
    }
    principio[55]='\0';
}

void strcatchar(char *principio,char texto)
{
    int largo=strlen(principio);
    principio[largo]=texto;
    principio[largo+1]='\0';
}

int buscarru(char *texto)
{
    int largo=strlen(texto);
    int i,x=0;
    for(i=0;i<largo-1;i++)
    {
        if(texto[i]=='r' && texto[i+1]=='u')
            x=i;
    }
    return x;
}

#include <stdio.h>
#include <string.h>
int main()
{
    int i,j,band=1;
    char address[50];
    scanf("%s", address);
    if(address[0]=='h' && strstr(address,"http") == address)
    {
        for(i = strlen(address); i >= 0; i--)
        {
            if(address[i]== 'r' && address[i+1]== 'u' && i > 4)
            {
                band = 0;
                printf("http://");
                for(j = 4;j < i; j++ )
                {
                    printf("%c", address[j]);
                }
                printf(".ru");
                if( address[ i + 2 ] != '\0')
                {
                    printf("/");
                    for(j = i + 2; address[j] != '\0'; j++)
                    {
                        printf("%c",address[j]);
                    }
                }
                break;
            }
        }
    }
    else if(address[0]=='f' && strstr(address,"ftp") == address)
    {
        for(i = strlen(address); i >= 0; i--)
        {
            if(address[i]== 'r' && address[i+1]== 'u' && i > 3)
            {
                band = 0;
                printf("ftp://");
                for(j = 3;j < i; j++ )
                {
                    printf("%c", address[j]);
                }
                printf(".ru");
                if( address[ i + 2 ] != '\0')
                {
                    printf("/");
                    for(j = i + 2; address[j] != '\0'; j++)
                    {
                        printf("%c",address[j]);
                    }
                }
                break;
            }
        }
    }

 return 0;
}

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#define MAXM 0x7fffffff
#define Max(a,b)((a)>(b)?(a):(b))
#define Min(a,b) ((a)>(b)?(b):(a))
#define INF 0x7ffffff
#define hash_mod 1111111
#define eps 1e-6
#define reset(a) memset(a,0,sizeof(a))
#define ret(a) memset(a,-1,sizeof(a))
#define lson  l,m,rt<<1
#define rson  m+1,r,rt<<1|1
#define demid int m=(l+r)>>1
#define ebug
int main()
{
  char str[55];
  char* http = "http",*ftp = "ftp";
  while(~scanf("%s",str))
  {
      int i,l,f = 0;
      l = strlen(str);
      if(strncmp(str,http,4)==0)
      {
          printf("%s",http);
          printf("://");
          for(i = 4;i < l ; i++)
          {
              if(str[i]=='r'&&str[i+1]=='u'&& f)
              {
                  printf(".ru");i+=2;
                  break;
              }
              else f = 1,printf("%c",str[i]);

          }
          if(i<l)
          printf("/%s",str+i);printf("\n");
      }
      else
      {
          printf("%s",ftp);
          printf("://");
           for(i = 3;i < l ; i++)
          {
              if(str[i]=='r'&&str[i+1]=='u' && f)
              {
                  printf(".ru");i+=2;
                  break;
              }
              else f = 1,printf("%c",str[i]);

          }
          if(i<l)
          printf("/%s",str+i);printf("\n");
      }
  }
    return 0;
}

#include <stdio.h>
#include<string.h>

int main(){
    char cadena[51];
    int i=0;
    int k=0;
    int j=0;            //check
    gets(cadena);
    if(cadena[0]=='h'){
        i=4;
        printf("http://");
        for(;cadena[i]!='\0';i++){
            printf("%c",cadena[i]);
            if(cadena[i+1]=='r'&& cadena[i+2]=='u'){
                if(j==0){
                    j=1;    //ya se llego a .ru
                    k=i+3;
                    printf(".ru");
                    if(cadena[k]!='\0'){
                        printf("/");
                    }
                    i=i+2;
                }
            }

        }

    }
    else if(cadena[0]=='f'){
        printf("ftp://");
        i=3;
        for(;cadena[i]!='\0';i++){
            printf("%c",cadena[i]);
            if(cadena[i+1]=='r'&& cadena[i+2]=='u'){
                if(j==0){
                    j=1;    //ya se llego a .ru
                    k=i+3;
                    printf(".ru");
                    if(cadena[k]!='\0'){
                        printf("/");
                    }
                    i=i+2;
                }
            }

        }

    }
    return 0;

}

#include<stdio.h>
#include<string.h>
int main(){
    char str[500];
    //char ans1[5],ans2[60],ans3[60];
    scanf("%s" ,&str);
    int i,j;
        if(str[0]=='f'){
            printf("ftp://");
            i=3;}
        else{
            printf("http://");
            i=4;
        }
        int flag=0,flag2=0;
        int len=strlen(str);
        printf("%c",str[i]);
        for(j=i+1;str[j]!='\0';j++){
            if(flag==0&&str[j]=='r'&&str[j+1]=='u'){
                printf(".ru");
                j++;
                flag=1;
                if(flag2==0&&j!=len-1){
                    printf("/");
                    flag2=1;}
					}
            else
            printf("%c",str[j]);
        }
    return 0;
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){

int i, j, c;
char page[50];
//char s[50];
gets(page);
i=0;
c=0;

while (page[i] != '\0'){
    if(isupper(page[i])){
        c = 1;
    }
    i++;
}

if (c == 0 && strlen(page) != 0){
if (page[0] == 'h'){
    printf("http://");
    i = 4;
}
else{
    printf("ftp://");
    i = 3;
}
j = 0;
while (page[i] != '\0'){
    printf("%c", page[i]);
    if (page[i+1] == 'r' && page[i+2] == 'u' && j == 0){
        j = 1;
        printf(".ru");
        if (page[i + 3] != '\0'){
            printf("/");
        }
        i = i + 2;
        }
        i++;
    }
    //putchar('\0');

}
return 0;
}

#include<stdio.h>
int main()
{
    char a,b;
    int i,done,once;
    done = 0;
    once = 0;
    a=getchar();
    if(a=='h')
    {
        for(i=0;i<4;i++)
        {
            printf("%c",a);
            a=getchar();
        }
    }
    else if(a=='f')
    {
        for(i=0;i<3;i++)
        {
            printf("%c",a);
            a=getchar();
        }
    }
    printf("://");
    while(a!='\n')
    {
        if(a!='r' && done == 0 )
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done != 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a!='r' && done != 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done == 0 && once == 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done == 0 && once == 1)
        {
            b = getchar();
            if(b=='u')
            {
                printf(".ru");
                done = 1;
                a=getchar();
                if(a!='\n')
                printf("/");
            }
            else if(b!='u')
            {
                printf("%c",a);
                once = 1;
                a=b;
            }
        }
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char a[55];
    scanf("%s",a);
    int len=strlen(a);
    int i=0,j=0;
    while(a[i]!='p')
    {
        printf("%c",a[i]);
        i++;
    }
    printf("%c://",a[i]);
    int k=i;
    do
    {
        k++;
    while(a[k]!='r' || a[k+1]!='u')
    k++;
    }while(k==i+1);
    //printf("K IS %d A[K] IS %c",k,a[k]);
    for(j=i+1;j<k;j++)
        printf("%c",a[j]);
    printf(".ru");
    k=k+2;
    if(k!=len)
    {
        printf("/");
        while(k!=len)
        {
            printf("%c",a[k]);
            k++;
        }
    }

    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
#define N 50
int main(){
    char opcion1[]= {"http://"};
    char opcion2[]={"ftp://"};
    char opcion3[]={".ru"};
    char opcion4= '/';

    int i=0;
    int subindice=0;
    int j=0;
    int bandera=0;
    char direccion[N];

    scanf("%s",direccion);
    if(direccion[0]== 'h'){
        printf("%s",opcion1);
        i+=4;
    }
    else {
        i+=3;
        printf("%s",opcion2);
    }
    while(direccion[i]!='\0'){
        if(direccion[i]=='r' && direccion[i+1]=='u' && bandera==1){
            printf("%s",opcion3);
            i+=2;
            if(direccion[i]!='\0'){
                printf("%c",opcion4);
                for(subindice=i; subindice<(strlen(direccion)); subindice++){
                    printf("%c",direccion[subindice]);
                }
                i=strlen(direccion);
            }
        }
        else if (bandera==0){
            if(direccion[i]=='r' && direccion[i+1]=='u'){
                printf("%c",direccion[i]);
                i++;
                printf("%c",direccion[i]);
                i++;
                bandera=1;
            }
            for(subindice=i; subindice<strlen(direccion); subindice++){
                if(direccion[i]== 'r' && direccion[i+1]=='u'){
                    i=subindice;
                    bandera=1;
                    break;
                }
                else {
                    printf("%c",direccion[subindice]);
                    i++;
                }
            }
        }
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main(){
    char *cadena = (char *)malloc(51 * sizeof(char));
    char *result = (char *)malloc(51 * sizeof(char));
    int p, j;
    int pos, limite;
    char aux[2];

    scanf("%s", cadena);
    int c = cadena[0];
    int c1 =  'f';
    if(c == c1){
        strcpy(result, "ftp://");
        p = 0;
        pos = 4;
        aux[0] = cadena[3];
        aux[1] = '\0';

        strcat(result, aux);
    }else{
        strcpy(result, "http://");
        p = 1;
        pos = 5;
        aux[0] = cadena[4];
        aux[1] = '\0';

        strcat(result, aux);
    }

    //printf("\np: %d, pos: %d ---- result: %s", p, pos, result);

    int i = pos;
    for(i; cadena[i] != '\0'; i++){
        if((cadena[i] == 'r') && (cadena[i+1] == 'u')){
            limite = i;

            break;
        }
    }

    for(j = pos; j < limite; j++){
        aux[0] = cadena[j];
        aux[1] = '\0';

        strcat(result, aux);
    }

    strcat(result, ".ru");

    for(j = limite+2;cadena[j] != '\0'; j++){
        if(j == limite + 2){    strcat(result, "/");}

        aux[0] = cadena[j];
        aux[1] = '\0';

        strcat(result, aux);
    }

    printf("%s", result);

    return 0;
}

#include <stdio.h>
#include <string.h>

int buscar(char a[], int i);
void clear(char a[], int x);
void contexto(char a[], char b[], int i);
void concatenar(char a[], char b[], char c[]);

int main()
{
    char cadena[51];
    char protocol_h[8] = "http://";
    char protocol_f[7] = "ftp://";
    char domain[50];
    char context[50];

    int i, j = 0, aux;

    scanf("%s", cadena);

    clear(domain, 50);
    clear(context, 50);

    if(cadena[0] == 'h')
    {
        aux = buscar(cadena, 5);
        for( i = 4; i <= aux; i++)
        {
            domain[j] = cadena[i];
            j++;
        }
        aux += 3;
        contexto(cadena, context, aux);
        concatenar(protocol_h, domain, context);
    }else
    {
        aux = buscar(cadena, 4);
        for( i = 3; i <= aux; i++)
        {
            domain[j] = cadena[i];
            j++;
        }
        aux += 3;
        contexto(cadena, context, aux);
        concatenar(protocol_f, domain, context);
    }
return 0;
}

void clear(char a[], int x)
{
    int j;
    for( j = 0; j < x; j++)
        a[j] = '\0';
}

int buscar(char a[], int i)
{
    int j, k, val = 0;
    k = strlen(a);
    for( j = k-1; j > i; j--)
    {
        if( a[j] == 'u')
        {
            if( a[j-1] == 'r')
            {
                val = j-2;
                break;
            }
        }
    }
    return val;
}

void contexto(char a[], char b[], int i)
{
    int j, k, x = 0;
    k = strlen(a);
    for(j = i; j < k; j++)
    {
        b[x] = a[j];
        x++;
    }
}

void concatenar(char a[], char b[], char c[])
{
    char x[] = ".ru";
    char barra[] = "/";
    char z[60];
    clear (z, 60);

    strcpy(z, a);
    strcat(z, b);
    strcat(z, x);
    if( c[0] != '\0' ){
        strcat(z, barra);
        strcat(z, c);
    }
    printf("%s", z);
}

#include <stdio.h>
#include <string.h>
int main()
{
    char s[55];
    int i,k,len,f;
    while(gets(s))
    {
        len=strlen(s);
        if(s[0]=='h')
        {
            for(i=0;i<4;i++)
            printf("%c",s[i]);
            printf("://");
            k=4;
        }
        else
        if(s[0]=='f')
        {
            for(i=0;i<3;i++)
            printf("%c",s[i]);
            printf("://");
            k=3;
        }
        for(i=k,f=0;i<len;i++)
        {
            if(i!=k&&s[i]=='r'&&s[i+1]=='u'&&f==0)
            {
                printf(".ru");f=1;i=i+2;
                if(i<len)
                printf("/");
                else
                break;
            }
            printf("%c",s[i]);
        }
        printf("\n");
    }
    return 0;
}

#include <stdio.h>
int main()
{
    char ch[51];
    int i,l;
    scanf("%s",ch);
    //printf("%s",ch);
    l=strlen(ch);
    if(ch[0]=='f')
    {
        printf("ftp://");
        for(i=3;i<l;i++)
        {
            if(i==3)printf("%c",ch[3]);
            else

                if(ch[i]=='r')
                {
                    if(ch[i+1]=='u')
                    {
                        printf(".%c%c",ch[i],ch[i+1]);
                        i=i+2;
                        if(i<l)printf("/");
                        while(i!=l)
                        {

                            printf("%c",ch[i]);
                            i++;
                        }
                        break;
                    }
                    else
                    {
                        printf("%c",ch[i]);
                        continue;
                    }
                }
                else printf("%c",ch[i]);
        }
    }
    if(ch[0]=='h')
    {
        printf("http://");
        for(i=4;i<l;i++)
        {
            if(i==4)printf("%c",ch[4]);
            else

                if(ch[i]=='r')
                {
                    if(ch[i+1]=='u')
                    {
                        printf(".%c%c",ch[i],ch[i+1]);
                        i=i+2;
                        if(i<l)printf("/");
                        while(i!=l)
                        {
                            printf("%c",ch[i]);
                            i++;
                        }
                        break;
                    }
                    else
                    {
                        printf("%c",ch[i]);
                        continue;
                    }
                }
                else printf("%c",ch[i]);
        }
    }
    return 0;

}

#include <stdio.h>
#include <string.h>

int  Now,i,L;
char Str[51];

void Judge_Protocol()
{
    if(Str[Now]=='f')
    {
        printf("ftp://");
        Now+=3;
    }
    else
    {
        printf("http://");
        Now+=4;
    }
    return;
}

void Judge_Domain()
{
    printf("%c",Str[Now]);
    for(i=Now+1; i<L; ++i)
    {
        if(Str[i]=='r'&&Str[i+1]=='u')
        {
            break;
        }
        printf("%c",Str[i]);
    }
    printf(".ru");
    Now=i+2;
    return;
}

void Judge_Context()
{
    if(Now==L)
    {
        return;
    }
    printf("/");
    for(i=Now; i<L; ++i)
    {
        printf("%c",Str[i]);
    }
    printf("\n");
    return;
}

int main()
{
    scanf("%s",Str);
    Now=0;
    L=strlen(Str);
    Judge_Protocol();
    Judge_Domain();
    Judge_Context();
    return 0;
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){

int a=0, j, k=0;
char direccion[50];

gets(direccion);

while (direccion[a] != '\0')
{
    if(isupper(direccion[a]))
    {
        k = 1; /*si es mayuscula*/
    }
    a++;
}

if (k == 0 && strlen(direccion) != 0) /*si todo esta en minuscula y si la londitud es distinta a cero*/
{
    if (direccion[0] == 'h')
    {
        printf("http://");
        a = 4;
    }
    else
    {
        printf("ftp://");
        a = 3;
    }
}
j = 0;
while (direccion[a] != '\0')
{
    printf("%c", direccion[a]);
    if (direccion[a+1] == 'r' && direccion[a+2] == 'u' && j == 0)
    {
        j = 1;
        printf(".ru");
        if (direccion[a + 3] != '\0')
        {
            printf("/");
        }
        a = a + 2;
    }
        a++;
}
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define S 50

int main (void) {
  int i = 0;
  char buf[S + 2];
  fgets (buf, S + 2, stdin);
  i += printf ("%s", buf[i] == 'f' ? "ftp://" : "http://") - 3;
  i += printf ("%.*s", (int) (strstr (buf + i + 1, "ru") - (buf + i)), buf + i);
  i += printf (".ru") - 1;
  printf ("%s%s", buf[i] == '\n' ? "" : "/", buf + i);
  exit (EXIT_SUCCESS);
}

#include <stdio.h>
#include <string.h>

int main(){
  int pos;
  char w[51];
  scanf("%s", w);
  if(w[0] == 'f'){
    printf("ftp://%c", w[3]);
    pos = 4;
  }
  else{
    printf("http://%c", w[4]);
    pos = 5;
  }
  while(w[pos] != 'r' || w[pos+1] != 'u'){
    printf("%c", w[pos]);
    pos++;
  }
  printf(".ru");
  pos += 2;
  if(w[pos] != '\0'){
    printf("/");
    for(int i = pos; w[i] != '\0'; i++){
      printf("%c", w[i]);
    }
  }
  printf("\n");
  return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    int k, di, q = 0, h;
    char cad[50], prot[5], dom[45] = " ", cont[45] = " ";
    scanf("%s", cad);
    cont[0] = '\0';
    if(cad[0] == 'h'){
        strcpy(prot, "http");
        di = 4;
    }else{
        strcpy(prot, "ftp");
        di   = 3;
    }
    for(k = di; k < strlen(cad); k++){
        if(cad[k] == 'r' && cad[k+1] == 'u' && k != di){
            if(cad[k+2] != '\0'){
                q = 0;
                for(h = k + 2; h <= strlen(cad); h++){
                    cont[q] = cad[h];
                    q++;
                }
            }
            break;
        }else{
            dom[q] = cad[k];
            q++;
        }
    }
    if(cont[0] != '\0'){
        printf("%s://%s.ru/%s", prot, dom, cont);
    }else{
        printf("%s://%s.ru", prot, dom);
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

const char http[]="http";
const char ftp[]="ftp";
const char ru[]="ru";

void findprotocol(char* str) {
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr=NULL;
    ptr=strstr(str,ftp);
    if (ptr!=NULL) {
        if ((ptr-str)==0) {
            strncpy(buffer1,str+3,strlen(str)-3+1);
            str[3]=':';str[4]='/';str[5]='/';
            strncpy(str+6,buffer1,strlen(buffer1)+1);
        } else {
            strncpy(buffer1,str+4,strlen(str)-4+1);
            str[4]=':';str[5]='/';str[6]='/';
            strncpy(str+7,buffer1,strlen(buffer1)+1);
        }
    } else {
        strncpy(buffer1,str+4,strlen(str)-4+1);
        str[4]=':';str[5]='/';str[6]='/';
        strncpy(str+7,buffer1,strlen(buffer1)+1);
    }
}

void finddomainandcontext(char* str) {
    int pos;
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr;
    ptr=strstr(str,ru);
    pos=ptr-str;
    if (str[pos-1]=='/') {
        ptr=strstr(str+pos+3,ru);
    }
    pos=ptr-str;
    strncpy(buffer1,str+pos,strlen(str)-pos+1);
    str[ptr-str]='.';
    strncpy(str+pos+1,buffer1,strlen(buffer1)+1);
    free(buffer1);
    buffer1=calloc(100,sizeof(char));
    if (pos+3!=strlen(str)) {
        strncpy(buffer1,str+pos+3,strlen(str)-pos-3+1);
        str[ptr-str+3]='/';
        strncpy(str+pos+4,buffer1,strlen(buffer1)+1);

    }
}

int main() {
    char input[100]="";
    scanf("%s",input);
    findprotocol(input);
    finddomainandcontext(input);
    printf("%s",input);
    return (0);
}

#include <stdio.h>
int main()
{
  char string[50+1], s;
  int i=0, start=0;
  scanf("%s", string);
  s = string[i];
  if(s == 'h')
  {
      printf("http://");
      start = 4;
  }
  else
  {
      start = 3;
      printf("ftp://");
  }
  i = start;
  while(start)
  {
      s=string[i];
      if(s == 'r' && string[i+1] == 'u' && i > start)
      {
          printf(".ru");
          i = i+2;
          if(string[i]!=NULL) printf("/");
          break;
      }
      printf("%c", s);
      i++;
  }
  while(string[i]!=NULL)
  {
      printf("%c", string[i]);
      i++;
  }
  return 0;
}

#include<stdio.h>
#include<string.h>
int main(){
    char str[500];
    char ans1[5],ans2[60],ans3[60];
    scanf("%s" ,&str);
    int i,j;
        if(str[0]=='f'){
            printf("ftp://");
            i=3;}
        else{
            printf("http://");
            i=4;
        }
        int flag=0,flag2=0;
        int len=strlen(str);
        printf("%c",str[i]);
        for(j=i+1;str[j]!='\0';j++){
            if(flag==0&&str[j]=='r'&&str[j+1]=='u'){
                printf(".ru");
                j++;
                flag=1;
                if(flag2==0&&j!=len-1){
                    printf("/");
                    flag2=1;}
					}
            else
            printf("%c",str[j]);
        }
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{

    char c,aux, address[60];
    int i = 0;

    c = getchar();

    if (c == 'h')
    {
        address[i++] = c;
        while((c = getchar()) != '\n')
        {
            if(i == 4)
            {
                address[4] = ':';
                address[5] = '/';
                address[6] = '/';
                i = 7;
            }

            if(c == 'u' && address[i-1] == 'r' && address[i-2] != '/')

            {
                aux = address[i - 1];
                address[i - 1] = '.';
                address[i] = aux;
                address[++i] = c;
                i++;
                break;
            }

            address[i++] = c;
        }
    }
    else
    {
        address[i++] = c;
        while((c = getchar()) != '\n')
        {
            if(c == 'u' && address[i-1] == 'r' && address[i-2] != '/')
            {
                aux = address[i - 1];
                address[i - 1] = '.';
                address[i] = aux;
                address[++i] = c;
                i++;
                break;
            }

            if(i == 3)
            {
                address[3] = ':';
                address[4] = '/';
                address[5] = '/';
                i = 6;
            }
            address[i++] = c;
        }
    }

    if((c = getchar()) != '\n')
    {
        address[i++] = '/';
        address[i++] = c;

    }

    if(c != '\n')
    {
        while((c = getchar()) != '\n')
        {
            address[i++] = c;
        }
    }

    address[i] = '\0';

    puts(address);

    return 0;
}

#include<stdio.h>
main () {
    char direccion [51];
    scanf("%s", &direccion);
    int i, band;
    i=band=0;
     if (direccion[0]=='h'){
        printf("http://");
        i=4;
    }
    if (direccion[0]=='f'){
        printf("ftp://");
        i=3;
    }
     while (direccion[i]!= '\0' ){
        printf("%c", direccion[i]);
        if (direccion[i+1]=='r' && direccion[i+2]=='u' && band==0){
            printf(".ru");
            band=1;
            if (direccion[i+3] != '\0'){
                printf("/");
            }
            i=i+2;
        }
        i++;
    }
return 0;
}

#include<stdio.h>
#include<ctype.h>
int main(){
int i,don=3,pun=0,j=0;
char direccion[51];
char dir[56]={};
scanf("%s",direccion);
i=0;
if(direccion[0] == 'h'){
    don = 4;
}
while(direccion[i]!='\0'){
    if(don == 0){
        dir[j]=':';
        j++;
        dir[j]='/';
        j++;
        dir[j]='/';
        j++;
    }
    if(pun==0 && direccion[i] == 'r' && direccion[i+1] == 'u' && don <0){
        dir[j]='.';
        pun++;
        j++;
    }
    dir[j] = direccion[i];
    j++;
    if(pun == 1 && direccion[i]=='u' && direccion[i+1]!='\0'){
        pun++;
        dir[j]='/';
        j++;
    }
    don=don-1;
    i++;
    }
    dir[j]='\0';
    printf("%s",dir);
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
char cadena[50];
int main(){
    int i,c,h=50;
    scanf("%s",cadena);
    if(cadena[0]=='h'){
        c=4;
    }else{
        c=3;
    }
    int k=0;
    for(i=0;cadena[i]!='\0';i++){
        if(i==c){
            printf("://");
        }
        if(i!=c){
            if(cadena[i]=='r' &&cadena[i+1]=='u' && k==0){
                printf(".");
                h=i+2;
                k=1;
            }
        }
        if(i==h){
            printf("/");

        }
        printf("%c",cadena[i]);
    }
return 0;
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){

int i, j, c;
char page[50];
//char s[50];
gets(page);
i=0;
c=0;

while (page[i] != '\0'){
    if(isupper(page[i])){
        c = 1;
    }
    i++;
}

if (c == 0 && strlen(page) != 0){
if (page[0] == 'h'){
    printf("http://");
    i = 4;
}
else{
    printf("ftp://");
    i = 3;
}
j = 0;
while (page[i] != '\0'){
    printf("%c", page[i]);
    if (page[i+1] == 'r' && page[i+2] == 'u' && j == 0){
        j = 1;
        printf(".ru");
        if (page[i + 3] != '\0'){
            printf("/");
        }
        i = i + 2;
        }
        i++;
    }
    //putchar('\0');

}
return 0;
}

#include<string.h>
#include<stdio.h>
int main () {
	char a[75],http[]="http",ftp[]="ftp";
	int i,n,c=0;
	gets(a);
	n=strlen(a);
	for(i=0;i<3;i++)
		if(a[i]==ftp[i])
			c++;
	if(c==3)
		printf("ftp://");
	else
	{
		printf("http://");
		c=4;
	}
	if(a[c]=='r' && a[c+1]=='u')
	{
		printf("ru");
		c+=2;
	}
	for(i=c;a[i]!='r' || a[i+1]!='u';i++)
		printf("%c",a[i]);
	printf(".ru");
	i+=2;
	c=0;
	for(;i<n;i++)
	{
		if(!c)
			printf("/");
		c++;
		printf("%c",a[i]);
	}
	printf("\n");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
char cadena[50];
int main(){
    int i,c,h=50;
    scanf("%s",cadena);
    if(cadena[0]=='h'){
        c=4;
    }else{
        c=3;
    }
    int k=0;
    for(i=0;cadena[i]!='\0';i++){
        if(i==c){
            printf("://");
        }
        if(i!=c){
            if(cadena[i]=='r' &&cadena[i+1]=='u' && k==0){
                printf(".");
                h=i+2;
                k=1;
            }
        }
        if(i==h){
            printf("/");
        }
        printf("%c",cadena[i]);
    }
return 0;
}

#define N 56
//50+1+5
#include<stdio.h>
int main() {
    char address[N];
    scanf("%s",address);
    int insert1=0;
    if(address[0]=='h'){
        insert1=3;
    }else{
        insert1=2;
    }
    int insert2=0;
    int insert3=0;
    int i,j;
    i=insert1+2;
    while(address[i]!='\0'){
        if(address[i]=='r' && address[i+1]=='u'){
            insert2=i-1;
            if(address[i+2]!='\0'){
                insert3=i+1;
            }
            break;
        }
        i++;
    }

    i=0;
    j=0;
    while(address[i]!='\0'){
        printf("%c",address[i]);
        if(i==insert1){
            printf("://");
        }else if(i==insert2){
            printf(".");
        }else if(i==insert3 && insert3!=0){
            printf("/");
        }
        i++;
    }
    printf("\n");
	return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main()
{
    char *line = (char*)malloc(64);
    scanf("%s", line);
    char *address = (char*)malloc(64);
    if (line[0] == 'h')
    {
        strcpy(address, "http://");
        line +=4;
    }
    else
    {
        strcpy(address, "ftp://");
        line +=3;
    }

    char *ru;
    ru = strstr(line, "ru");
    if (ru == line)
        ru = strstr(line+1, "ru");

    strncat(address, line, ru - line);
    strcat(address, ".ru");

    line += ru - line + 2;
    if ( strlen(line) != 0)
    {
        strcat(address, "/");
        strcat(address, line);
    }
    printf("%s\n", address);

    return 0;
}

#include <stdio.h>
#include <string.h>

int buscar(char a[], int i);
void clear(char a[], int x);
void contexto(char a[], char b[], int i);
void concatenar(char a[], char b[], char c[]);

int main()
{
    char cadena[51];
    char protocol_h[8] = "http://";
    char protocol_f[7] = "ftp://";
    char domain[50];
    char context[50];

    int i, j = 0, aux;

    scanf("%s", cadena);

    clear(domain, 50);
    clear(context, 50);

    if(cadena[0] == 'h')
    {
        aux = buscar(cadena, 5);
        for( i = 4; i <= aux; i++)
        {
            domain[j] = cadena[i];
            j++;
        }
        aux += 3;
        contexto(cadena, context, aux);
        concatenar(protocol_h, domain, context);
    }
    else
    {
        aux = buscar(cadena, 4);
        for( i = 3; i <= aux; i++)
        {
            domain[j] = cadena[i];
            j++;
        }
        aux += 3;
        contexto(cadena, context, aux);
        concatenar(protocol_f, domain, context);
    }
return 0;
}

void clear(char a[], int x)
{
    int j;
    for( j = 0; j < x; j++)
        a[j] = '\0';
}

int buscar(char a[], int i)
{
    int j, k, val = 0;
    k = strlen(a);
    for( j = k-1; j > i; j--)
    {
        if( a[j] == 'u')
        {
            if( a[j-1] == 'r')
            {
                val = j-2;
                break;
            }
        }
    }
    return val;
}

void contexto(char a[], char b[], int i)
{
    int j, k, x = 0;
    k = strlen(a);
    for(j = i; j < k; j++)
    {
        b[x] = a[j];
        x++;
    }
}

void concatenar(char a[], char b[], char c[])
{
    char x[] = ".ru";
    char barra[] = "/";
    char z[60];
    clear (z, 60);

    strcpy(z, a);
    strcat(z, b);
    strcat(z, x);
    if( c[0] != '\0' ){
        strcat(z, barra);
        strcat(z, c);
    }
    printf("%s", z);
}

#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>

int main() {
  char str[51];
  char * p = NULL;

  scanf("%s", str);
  if ( str[0] == 'h' ) {
    printf("%s", "http");
    p = str+4;
  } else {
    printf("%s", "ftp");
    p = str+3;
  }
  printf("://");
  putc(*p++, stdout);
  while ( *p != 'r' || *(p+1) != 'u' ) {
    putc(*p++, stdout);
  }
  printf("%s", ".ru");
  p+=2;
  if ( *p )
    putc('/', stdout);
  while ( *p )
    putc(*p++, stdout);
  printf("\n");
  return EXIT_SUCCESS;
}

#include<stdio.h>
#include<stdlib.h>

void arregla(char *ptrS);

int main()
{
    char direccion[51]="";
    scanf("%s",&direccion);
    arregla(direccion);
}

void arregla(char *ptrS)
{
    int x,y,largo,dato=0;
    char nuevo[80]="";
    char aux[80]="";
    largo = strlen(ptrS);
    y = strlen(strstr(ptrS,"ru"));

    if(strstr(ptrS,"ftp")!=NULL)
    {
        if(strcmp(strstr(ptrS,"ftp"),ptrS)==0)
        {
            dato=1;
            strcat(nuevo,"ftp://");
            x = largo-3-y;
            if(x!=0)
            {
                strncat(nuevo,&ptrS[3],x);
                strcat(nuevo,".ru");
                if(y!=2)
                {
                    strcat(nuevo,"/");
                }

            }
            else
            {
                strcat(aux,strstr(ptrS,"ru"));
                y = strlen(strstr(&aux[2],"ru"));
                x = largo-3-y;
                strncat(nuevo,&ptrS[3],x);
                strcat(nuevo,".ru");
                if(y!=2)
                {
                strcat(nuevo,"/");
                }
            }
            strcat(nuevo,&ptrS[largo-y+2]);
        }
    }
    if(dato == 0)
    {
        strcat(nuevo,"http://");
        x = largo-4-y;
        if(x!=0)
        {
            strncat(nuevo,&ptrS[4],x);
            strcat(nuevo,".ru");
            if(y!=2)
            {
                strcat(nuevo,"/");
            }

        }
        else
        {
            strcat(aux,strstr(ptrS,"ru"));
            y = strlen(strstr(&aux[2],"ru"));
            x = largo-4-y;
            strncat(nuevo,&ptrS[4],x);
            strcat(nuevo,".ru");
            if(y!=2)
            {
                strcat(nuevo,"/");
            }

        }
        strcat(nuevo,&ptrS[largo-y+2]);
    }
    printf("%s\n",nuevo);
}

#include <stdio.h>
#include <string.h>

int main()
{
    char direccion[56];
    char aux[51];
    int i;
    int punto;

    scanf("%s", direccion);

    if(direccion[0] == 'h')
    {
        for(i=strlen(direccion); i >= 4; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[4] = ':';
        direccion[5] = '/';
        direccion[6] = '/';

        for(i=8; direccion[i]!='\0'; i++)
        {
            aux[i-8]= direccion[i];
        }

        punto = strstr(aux,"ru") - aux + 8;

        for(i=strlen(direccion); i >= punto; i--)
        {
            direccion[i+1] = direccion[i];
        }

        direccion[punto] = '.';

        for(i=strlen(direccion); i >= punto+3; i--)
        {
            direccion[i+1] = direccion[i];
        }
        if(direccion[punto+3]!='\0')
            direccion[punto+3] = '/';

    }
    else
    {
        for(i=strlen(direccion); i >= 3; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[3] = ':';
        direccion[4] = '/';
        direccion[5] = '/';

        for(i=7; direccion[i]!='\0'; i++)
        {
            aux[i-7]= direccion[i];
        }

        punto = strstr(aux,"ru") - aux + 7;

        for(i=strlen(direccion); i >= punto; i--)
        {
            direccion[i+1] = direccion[i];
        }

        direccion[punto] = '.';

        for(i=strlen(direccion); i >= punto+3; i--)
        {
            direccion[i+1] = direccion[i];
        }
        if(direccion[punto+3]!='\0')
            direccion[punto+3] = '/';

    }

    printf("%s", direccion);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv)
{
	char input[60], output[60];
	scanf("%s",&input);
	int i = 0, j = 0, counter;
	while(input[i] != 'p')
	{
		output[i] = input[i];
		i++;
		j++;
	}
	output[i] = input[i];
	i++;
	j++;
	output[i] = ':';
	output[i+1] = '/';
	output[i+2] = '/';
	i = i + 3;
	if(input[j] == 'r' && input[j+1] == 'u')
	{
		output[i] = 'r';
		output[i+1] = 'u';
		i += 2;
		j += 2;
	}
	label:
	while(input[j] != 'r')
	{
		output[i] = input[j];
		j++;
		i++;
	}
	if(input[j+1] != 'u')
	{
		output[i] = input[j];
		i++;
		j++;
		goto label;
	}
	output[i] = '.';
	output[i+1] = 'r';
	output[i+2] = 'u';
	i = i + 3;
	j = j + 2;
	if(input[j] != '\0')
	{
		output[i] = '/';
		i++;
	}
	while(input[j] != '\0')
	{
		output[i] = input[j];
		i++;
		j++;
	}
	output[i] = '\0';
	printf("%s",output);
	return 0;
}

#include <stdio.h>
#include <string.h>
int main(){
	int i;
	char a[51];
	scanf("%s", a);
	if (a[0] == 'f'){
		printf("ftp://");
		for(i=3;i<4;i++)
		printf("%c",a[i]);
		for (i = 4; a[i]!='r'||a[i+1]!='u'; i++){
			printf("%c", a[i]);
		}
		printf(".ru");
		i+=2;
		if(i<strlen(a))
		printf("/");
		for (; i < strlen(a); i++)
			printf("%c", a[i]);
	}
	else{
		printf("http://");
		for(i=4;i<5;i++)
		printf("%c",a[i]);
		for (i = 5; a[i] != 'r' || a[i + 1] != 'u'; i++){
			printf("%c", a[i]);
		}
		printf(".ru");
		i+=2;
		if(i<strlen(a))
		printf("/");
		for (; i < strlen(a); i++)
			printf("%c", a[i]);
	}
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char a[55];
    scanf("%s",a);
    int len=strlen(a);
    int i=0,j=0;
    while(a[i]!='p')
    {
        printf("%c",a[i]);
        i++;
    }
    printf("%c://",a[i]);
    int k=i;
    do
    {
        k++;
    while(a[k]!='r' || a[k+1]!='u')
    k++;
    }while(k==i+1);
    //printf("K IS %d A[K] IS %c",k,a[k]);
    for(j=i+1;j<k;j++)
        printf("%c",a[j]);
    printf(".ru");
    k=k+2;
    if(k!=len)
    {
        printf("/");
        while(k!=len)
        {
            printf("%c",a[k]);
            k++;
        }
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

main()
{
    int k, n, i, l;
    char note[51];
    char address[60];

    scanf("%s", note);

    if(note[0] == 'h')          /*si la primera letra es h, se puede asumir que es http*/
        k = 4;
    else
        k = 3;                  /*si no, se asume que es ftp*/

    for(i=0; i<k; i++)          /*se copian los caracteres del cuaderno a la direccion*/
        address[i] = note[i];

    n = k;

    address[k++] = ':';         /*se agregan los caracteres divisorios despues del protocolo*/
    address[k++] = '/';
    address[k++] = '/';

    for(i=strlen(note)-1; i>n; i--)
    {
        if(note[i] == 'r' && note[i+1] == 'u')
        {
            l = i;
            break;
        }
    }

    for(i=n; i<l; i++)
    {
        address[k++] = note[i];
    }

    address[k++] = '.';
    address[k++] = 'r';
    address[k++] = 'u';

    if(note[l+2] != '\0')
    {
        address[k++] = '/';

        for(i=l+2; i<strlen(note); i++)
            address[k++] = note[i];
    }

    address[k] = '\0';

    printf("%s", address);

    /*printf("\n");
    system("pause");*/

    return 0;
}

#include <stdio.h>
#include <string.h>

int main(){
  int pos;
  char w[51];
  scanf("%s", w);
  if(w[0] == 'f'){
    printf("ftp://%c", w[3]);
    pos = 4;
  }
  else{
    printf("http://%c", w[4]);
    pos = 5;
  }
  while(w[pos] != 'r' || w[pos+1] != 'u'){
    printf("%c", w[pos]);
    pos++;
  }
  printf(".ru");
  pos += 2;
  if(w[pos] != '\0'){
    printf("/");
    for(int i = pos; w[i] != '\0'; i++){
      printf("%c", w[i]);
    }
  }
  printf("\n");
  return 0;
}

#include <stdio.h>

int main()
{
    int i;
    char DirWeb[50];
    char aux[53]="";
    char s[55]="";
    gets(DirWeb);
    int p,c,flag=0;
    if(DirWeb[0]=='h')
    {
        strcpy(aux,"http://");
        Cpy(aux,DirWeb,4,3);
        p=8;
    }else if(DirWeb[0]=='f')
    {
        strcpy(aux,"ftp://");
        Cpy(aux,DirWeb,3,3);
        p=7;
    }
    int n=strlen(aux);
    for(i=p;aux[i]!='\0';i++)
    {
        if(aux[i]=='r' && aux[i+1]=='u' && flag==0)
        {
            if(i!=n-2)
            {
            strncat(s,aux,i);
            strcat(s,".ru/");
            c=i+2;
            Cpy(s,aux,c,2);
            }else{
            strncat(s,aux,i);
            strcat(s,".ru");
            }
            flag=1;
        }
    }
        puts(s);

    return 0;
}

void Cpy(char *str1,char *str2,int a,int b)
{
    int i;
        for(i=a;(str1[i+b]=str2[i])!='\0';i++)
        {
          str1[i+b]=str2[i];
        }
}

#include <stdio.h>
#include <string.h>
char s[60];
int main()
{
    int n,i,gata;
    gets(s);
    n=strlen(s);
    if(s[0]=='f') // ftp
    {
        printf("ftp://");
        for(i=3;i<n;i++)
        {
            printf("%c",s[i]);
            if(s[i+1]=='r' && s[i+2]=='u')
            {
                gata=i;
                i=n;
            }
        }
        printf(".ru");
        if(gata+2!=n-1)
        {
            printf("/");
            for(i=gata+3;i<n;i++)
                printf("%c",s[i]);
        }
    }
    else
    {
        printf("http://");
        for(i=4;i<n;i++)
        {
            printf("%c",s[i]);
            if(s[i+1]=='r' && s[i+2]=='u')
            {
                gata=i;
                i=n;
            }
        }
        printf(".ru");
        if(gata+2!=n-1)
        {
            printf("/");
            for(i=gata+3;i<n;i++)
                printf("%c",s[i]);
        }
    }
    return 0;
}

#include <stdio.h>

int main () {

    char dir[50];
    int c,ban=1;

    scanf("%s",dir);
    char *p=dir;
    if(dir[0]=='f')
        {
            printf("ftp://");
            p+=3;
        }
    else
        {
            printf("http://");
            p+=4;
        }
    printf("%c",*p);
    p++;

    while (*p!='\0')
    {
        if(*p=='r' && ban==1)
        {
            p++;
           if( *p=='u')
            {
                printf(".ru");
                ban=0;
                p++;
                if(*p=='\0')
                    return 0;
                else
                    printf("/");
            }else
                p--;
        }
        printf("%c",*p);
        p++;

    }
    return 0;
}

#include <stdio.h>
#include <string.h>
#define NN 64

int main(void)
{
	char url[NN], tmp[NN], *p;
	while (gets(url)) {
		p = url;
		strncpy(tmp, url, 3);
		tmp[3] = 0;
		if (strcmp(tmp, "ftp") == 0) {
			printf("ftp://");
			p += 3;
		} else {
			printf("http://");
			p += 4;
		}
		if (p[0] == 'r' && p[1] == 'u') {
			printf("ru");
			p += 2;
		}
		while (!(p[0] == 'r' && p[1] == 'u')) {
			putchar(*p++);
		}
		printf(".ru");
		p += 2;
		if (*p == '\0') {
			puts("");
			continue;
		}
		printf("/%s\n", p);
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
#define maxn 1000
int main()
{
    int i,j,mark=0,len,ok;
    char a[maxn],m[10]={'r','u'};
    scanf("%s",a);
    len=strlen(a);
    if(a[2]=='t')ok=0;
    else    ok=1;
    for(i=0;i<=len-2;i++)
    {
        for(j=0;j<2;j++)
        {
            if(a[i+j]!=m[j])
                break;
        }
        if(j==2)
        {
            if(ok==0&&i>4)
            {
                mark=i;
                break;
            }
            else if(ok==1&&i>3)
            {
                mark=i;
                break;
            }
        }
    }
    if(ok==0)
    {
        printf("http://");
        for(i=4;i<mark;i++)
            printf("%c",a[i]);
        printf(".ru");
        if(len!=mark+2)
        {
            printf("/");
            for(i=mark+2;i<len;i++)
                printf("%c",a[i]);
        }
    }
    else
    {
        printf("ftp://");
        for(i=3;i<mark;i++)
            printf("%c",a[i]);
        printf(".ru");
        if(len!=mark+2)
        {
            printf("/");
            for(i=mark+2;i<len;i++)
                printf("%c",a[i]);
        }
    }
    return 0;
}

#include <stdio.h>
#include <string.h>

void url (char cadena [], int i);

int main ()  {
char cadena [ 50 ];
int i ;
fflush ( stdin );
gets ( cadena );
    if ( cadena [ 0 ]== 'f' ){
        for ( i = 0 ; i < 3 ; i ++){
            putchar(cadena[i]);
        }
        url ( cadena , 3 );
    }
      else  if ( cadena [ 0 ]== 'h' ){
        for ( i = 0 ; i < 4 ; i ++){
            putchar(cadena[i]);
        }
        url ( cadena , 4);
        }
    return  0 ;
}

void url ( char cadena [],  int i ){
 int flag = 0 ;
 printf ( "://" );
    //putchar(cadena[i]);
    while  ( cadena[ i ]!=  '\0'  ){
        putchar( cadena[ i ]);
        if  ( flag==0 && cadena[ i + 1 ]== 'r'  && cadena[ i + 2 ]== 'u' ){
            printf ( ".ru" );
            flag= -1 ;
            if  ( cadena [ i + 3 ]  !=  '\0' ){
                printf( "/" );
            }
            i = i + 2 ;
        }
        i ++;
    }
}

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){

int i, j, k;
char page[50];
//char s[50];
gets(page);
i=0;
k=0;

while (page[i] != '\0'){
    if(isupper(page[i])){
        k = 1;
    }
    i++;
}

if (k == 0 && strlen(page) != 0){
if (page[0] == 'h'){
    printf("http://");
    i = 4;
}
else{
    printf("ftp://");
    i = 3;
}
j = 0;
while (page[i] != '\0'){
    printf("%c", page[i]);
    if (page[i+1] == 'r' && page[i+2] == 'u' && j == 0){
        j = 1;
        printf(".ru");
        if (page[i + 3] != '\0'){
            printf("/");
        }
        i = i + 2;
        }
        i++;
    }
    //putchar('\0');

}
return 0;
}

#include<stdio.h>
#include<string.h>
int isru(char *a)
{
    if(*a=='r'&&*(a+1)=='u')
        return 1;
    else
        return 0;
}
int main()
{
    int i,j,k,l,m,n,t,o,p,q;
    int a[1000],b[1000];
    char s[100];
    while(scanf("%s",s)!=EOF)
    {
        if(s[0]=='f')
        {
            printf("ftp://");
            i=3;
        }
        else
        {
            printf("htttp://");
            i=4;
        }
        for(;s[i];i++)
        {
            if(!isru(&s[i]))
                printf("%c",s[i]);
            else
            {
                printf(".ru");
                i+=2;
                break;
            }
        }
        if(s[i])
        {
            printf("/");
            while(s[i])
            {
                printf("%c",s[i]);
                i++;
            }
        }
        printf("\n");
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[60],*p,h[5]="http",f[4] ="ftp";
    int i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    for(i =0;i<3;i++)
    {
        if(s[i]!=f[i])
        {
            break;
        }
    }
    p =strstr(s,"ru");
    if(i ==3)
    {
        printf("%s://",f);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    else
    {
        i =4;
        printf("%s://",h);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len;
            len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    printf("\n");
    return  0;
}

#include<stdio.h>
#include<stdlib.h>
char cadena[50];
int main(){
    int i,c,h;
    scanf("%s",cadena);
    if(cadena[0]=='h'){
        c=4;
    }else{
        c=3;
    }
    int k=0;
    for(i=0;cadena[i]!='\0';i++){
        if(i==c){
            printf("://");
        }
        if(i!=c){
            if(cadena[i]=='r' &&cadena[i+1]=='u' && k==0){
                printf(".");
                h=i+2;
                k=1;
            }
        }
        if(i==h){
            printf("/");
        }
        printf("%c",cadena[i]);
    }
return 0;
}

#include <stdio.h>
#include <string.h>
char s[60];
int main()
{
    int n,i,gata;
    gets(s);
    n=strlen(s);
    if(s[0]=='f') // ftp
    {
        printf("ftp://");
        for(i=3;i<n;i++)
        {
            printf("%c",s[i]);
            if(s[i+1]=='r' && s[i+2]=='u')
            {
                gata=i;
                i=n;
            }
        }
        printf(".ru/");
        for(i=gata+3;i<n;i++)
            printf("%c",s[i]);
    }
    else
    {
        printf("http://");
        for(i=4;i<n;i++)
        {
            printf("%c",s[i]);
            if(s[i+1]=='r' && s[i+2]=='u')
            {
                gata=i;
                i=n;
            }
        }
        printf(".ru/");
        for(i=gata+3;i<n;i++)
            printf("%c",s[i]);
    }
    return 0;
}

#include <stdio.h>
#include <string.h>

int  Now,i,L;
char Str[51];

void Judge_Protocol()
{
    if(Str[Now]=='f')
    {
        printf("ftp://");
        Now+=3;
    }
    else
    {
        printf("http://");
        Now+=4;
    }
    return;
}

void Judge_Domain()
{
    for(i=Now;i<L;++i)
    {
        if(Str[i]=='r'&&Str[i+1]=='u')
        {
            break;
        }
        printf("%c",Str[i]);
    }
    printf(".ru");
    Now=i+2;
    return;
}

void Judge_Context()
{
    if(Now==L)
    {
        return;
    }
    printf("/");
    for(i=Now;i<L;++i)
    {
        printf("%c",Str[i]);
    }
    printf("\n");
    return;
}

int main()
{
    scanf("%s",Str);
    Now=0;
    L=strlen(Str);
    Judge_Protocol();
    Judge_Domain();
    Judge_Context();
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char direccion[ 51 ], dominio[ 46 ];
    char *ptrDireccion;
    int i, tam_dominio;

    scanf( "%s", direccion);

    if( direccion[ 0 ] == 'h' ){
        printf( "http://" );
        i = 4;
    }else{
        printf( "ftp://" );
        i = 3;
    }

    ptrDireccion = direccion + i + 1;
    while( strncmp( ptrDireccion, "ru", 2 ) ){
        ptrDireccion++;
    }

    tam_dominio = ptrDireccion - direccion - i;

    strncpy( dominio, direccion + i, tam_dominio );
    dominio [ tam_dominio ] = '\0';

    printf( "%s.ru/%s", dominio, ptrDireccion + 2 );

    return 0;
}

#include<stdio.h>
#include<ctype.h>
int main(){
int i,don=3,pun=0,j=0;
char direccion[51];
char dir[56]={};
scanf("%s",direccion);
i=0;
if(direccion[0] == 'h'){
    don = 4;
}
while(direccion[i]!='\0'){
    if(pun==0 && direccion[i] == 'r' && direccion[i+1] == 'u'){
        dir[j]='.';
        pun++;
        j++;
    }
    if(don == 0){
        dir[j]=':';
        j++;
        dir[j]='/';
        j++;
        dir[j]='/';
        j++;
    }
    dir[j] =direccion[i];
    j++;
    if(pun == 1 && direccion[i]=='u'/*&& direccion[i+1]!='\0'*/){
        pun++;
        dir[j]='/';
        j++;
    }
    don=don-1;
    i++;
    }
    printf("%s",dir);
    return 0;
}

#include <stdio.h>

int main () {

    char dir[50];
    int c,ban=1;

    scanf("%s",dir);
    char *p=dir;
    if(dir[0]=='f')
        {
            printf("ftp://");
            p+=3;
        }
    else
        {
            printf("http://");
            p+=4;
        }

    while (*p!='\0')
    {
        if(*p=='r' && ban==1)
            {
                printf(".ru/");
                ban=0;
                p+=2;
            }
            printf("%c",*p);

        p++;

    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[60],*p,h[5]="http",f[4] ="ftp";
    int i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    for(i =0;i<3;i++)
    {
        if(s[i]!=f[i])
        {
            break;
        }
    }
    p =strstr(s,"ru");
    if(i ==3)
    {
        printf("%s://",f);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    else
    {
        i =4;
        printf("%s://",h);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    printf("\n");
    return  0;
}

#include <stdio.h>
#include <string.h>
#define NN 64

int main(void)
{
	char url[NN], tmp[NN], *p;
	while (gets(url)) {
		p = url;
		strncpy(tmp, url, 3);
		tmp[3] = 0;
		if (strcmp(tmp, "ftp") == 0) {
			printf("ftp://");
			p += 3;
		} else {
			printf("http://");
			p += 4;
		}
		while (!(p[0] == 'r' && p[1] == 'u')) {
			putchar(*p++);
		}
		printf(".ru");
		p += 2;
		if (*p == '\0') {
			puts("");
			continue;
		}
		printf("/%s\n", p);
	}
	return 0;
}

#include<stdio.h>
#include<stdio.h>
int main()
{
int i,a,c,d,t=0,j,q=1;
char x,arr[99];
scanf("%s",arr);
for(i=0;i<(strlen(arr));i++)
	{

	if(arr[i-1]=='p'&&t==0)
	{printf("://");

	t=1;
	}

	if(arr[i]=='r'&&arr[i+1]=='u'&&q==1)
		{
			printf(".");
			printf("ru/");
			t=2;
			q=2;
			i++;
		}

	else
		printf("%c",arr[i]);

	}
return 0;

}

#include<stdio.h>
#include<string.h>
int isru(char *a)
{
    if(*a=='r'&&*(a+1)=='u')
        return 1;
    else
        return 0;
}
int main()
{
    int i,j,k,l,m,n,t,o,p,q;
    int a[1000],b[1000];
    char s[100];
    scanf("%s",s);
        if(s[0]=='f')
        {
            printf("ftp://");
            i=3;
        }
        else
        {
            printf("htttp://");
            i=4;
        }
        for(;s[i];i++)
        {
            if(!isru(&s[i]))
                printf("%c",s[i]);
            else
            {
                printf(".ru");
                i+=2;
                break;
            }
        }
        if(s[i])
        {
            printf("/");
            while(s[i])
            {
                printf("%c",s[i]);
                i++;
            }
        }
        printf("\n");

    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
int i,j,k,x=0,flag=0,flog=0;
char pp[100];
gets(pp);
if(pp[0]=='f')
 { printf("ftp://");
  x=3;}
else
  {printf("http://");
   x=4;}
for(i=x;i<strlen(pp);i++)
  { printf("%c",pp[i]);
  if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3==strlen(pp)&&x!=i)
     {printf(".ru");
      i+=2;
      flag=2;}
      else if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3!=strlen(pp)&&x!=i)
      {printf(".ru/");
      i+=2;
      flag=1;}
  }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    int k, di, q = 0, h;
    char cad[50], prot[5], dom[45] = " ", cont[45] = " ";
    scanf("%s", cad);
    if(cad[0] == 'h'){
        strcpy(prot, "http");
        di = 4;
    }else{
        strcpy(prot, "ftp");
        di   = 3;
    }
    for(k = di; k < strlen(cad); k++){
        if(cad[k] == 'r' && cad[k+1] == 'u' && k != di){
            if(cad[k+2] != '\0'){
                q = 0;
                for(h = k + 2; h <= strlen(cad); h++){
                    cont[q] = cad[h];
                    q++;
                }
            }
            break;
        }else{
            dom[q] = cad[k];
            q++;
        }
    }
    printf("%s://%s.ru/%s", prot, dom, cont);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
int i,j,k,x=0,flag=0,flog=0;
char pp[55];
gets(pp);
if(pp[0]=='f')
 { printf("ftp://");
  x=3;}
else
  {printf("http://");
   x=4;}
for(i=x;i<strlen(pp);i++)
  { printf("%c",pp[i]);
  if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3==strlen(pp)&&x!=i)
     {printf(".ru");
      i+=2;
      flag=1;}
      else if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3!=strlen(pp)&&x!=i)
      {printf(".ru/");
      i+=2;
      flag=1;}
  }

    return 0;
}

#include<stdio.h>
main () {
    char direccion [51];
    scanf("%s", &direccion);
    int i, n, band;
    i=band=0;
    n=strlen(direccion);
    if (direccion[0]=='h'){
        printf("http://");
        i=4;
    }
    if (direccion[0]=='f'){
        printf("ftp://");
        i=3;
    }
     while (i<n){
        if (direccion[i]=='r' && direccion[i+1]=='u' && band==0){
            printf(".ru/");
            band=1;
            i=i+2;
        }
        printf("%c", direccion[i]);
        i++;
    }
return 0;
}

#include<stdio.h>
main () {
    char direccion [51];
    scanf("%s", &direccion);
    int i, n, band;
    i=band=0;
    n=strlen(direccion);
    if (direccion[0]=='h'){
        printf("http://");
        i=4;
    }
    if (direccion[0]=='f'){
        printf("ftp://");
        i=3;
    }
     while (i<n){
         printf("%c", direccion[i]);
        if (direccion[i+1]=='r' && direccion[i+2]=='u' && band==0){
            printf(".ru/");
            band=1;
            i=i+2;
        }
        i++;
    }
return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

main()
{
    int k, n, i, l;
    char note[51];
    char address[60];

    scanf("%s", note);

    if(note[0] == 'h')          /*si la primera letra es h, se puede asumir que es http*/
        k = 4;
    else
        k = 3;                  /*si no, se asume que es ftp*/

    for(i=0; i<k; i++)          /*se copian los caracteres del cuaderno a la direccion*/
        address[i] = note[i];

    n = k;

    address[k++] = '/';         /*se agregan los caracteres divisorios despues del protocolo*/
    address[k++] = '/';
    address[k++] = ':';

    for(i=strlen(note)-1; i>n; i--)
    {
        if(note[i] == 'r' && note[i+1] == 'u')
        {
            l = i;
            break;
        }
    }

    for(i=n; i<l; i++)
    {
        address[k++] = note[i];
    }

    address[k++] = '.';
    address[k++] = 'r';
    address[k++] = 'u';

    if(note[l+2] != '\0')
    {
        address[k++] = '/';

        for(i=l+2; i<strlen(note); i++)
            address[k++] = note[i];
    }

    address[k] = '\0';

    printf("%s", address);

    /*printf("\n");
    system("pause");*/

    return 0;
}

#include <stdio.h>
#include <string.h>
int main()
{
	int h,w,i,j;
	char str[51];
	scanf("%s",str);
	w=strlen(str);
	h=0;
	if (str[0]=='h'){
		printf("http://");
		h=h+4;
		for (i=h;str[i]!='r' || str[i+1]!='u';i++){
			printf("%c",str[i]);
			h=h+1;
		}
		printf(".ru");
		h=h+2;
		if(h<w){
			printf("/");
			for (j=h;j<w;j++){
				printf("%c",str[j]);
			}
		}
	}
	else if (str[0]=='f'){
		printf("ftp://");
		h=h+3;
		for (i=h;str[i]!='r' || str[i+1]!='u';i++){
			printf("%c",str[i]);
			h=h+1;
		}
		printf(".ru");
		h=h+2;
		if(h<w){
			printf("/");
			for (j=h;j<w;j++){
				printf("%c",str[j]);
			}
		}
	}

	return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>

int main()
{
    int i,var,inter,p,dimen;
    char direccion[50]=" ",protocolo[5];
    char *protocolos[]={"http","ftp"};
    scanf("%s",direccion);
    if(direccion[0]=='h')
    {
        strcpy(protocolo,protocolos[0]);
        var=4;
    }
    else
    {
        strcpy(protocolo,protocolos[1]);
        var=3;
    }
    i=var;
    for(i=var;i<(strlen(direccion)-1);i++)
    {
        if(direccion[i]=='r' && direccion[i+1]=='u')
        {
            p=i;
            i=(strlen(direccion)-1);
        }
    }
    i=0;
    fflush(stdin);
    char dominio[p-var];
    if((p-var)>0)
    {
        for(i=var;i<=p-1;i++)
        {
            dominio[i-var]=direccion[i];
        }
    }
    i=0;
    dimen=(strlen(direccion)-1)-(p+1);
    char contexto[dimen];

    if((p+1)<strlen(direccion))
    {
        for( i=p+2; i<=strlen(direccion); i++)
        {
            contexto[i-(p+2)]=direccion[i];

        }
    }
    else
    {
        for( i=p+2; i<=strlen(direccion); i++)
        {
            contexto[i-(p+2)]=' ';

        }
    }
    fflush(stdin);
    printf("%s://%s.ru/%s\n",protocolo,dominio,contexto);

    return 0 ;
}

#include<stdio.h>
#include<string.h>
int main() {
	int u,i,j;
	char arr[100];
	scanf("%s",arr);
	u=strlen(arr);
	if(arr[0]=='h'){
		printf("http://");
		for(i=4;;i++){
			if(arr[i]=='r'){
				if(arr[i+1]=='u'){
					printf(".ru/");
					break;
				}
			}

				printf("%c",arr[i]);

		}
		for(i+=2;i<u;i++)
			printf("%c",arr[i]);
	}
	else{
		printf("ftp://");
		for(i=3;;i++){
                        if(arr[i]=='r'){
                                if(arr[i+1]=='u'){
                                        printf(".ru/");
                                        break;
                                }
                        }

                        	printf("%c",arr[i]);
                 }
		for(i+=2;i<u;i++)
			printf("%c",arr[i]);
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
int i,j,k,x=0,flag=0,flog=0;
char pp[55];
gets(pp);
if(pp[0]=='f')
 { printf("ftp://");
  x=3;}
else
  {printf("http://");
   x=4;}
for(i=x;i<strlen(pp);i++)
  { printf("%c",pp[i]);
      if(pp[i+1]=='r'&&pp[i+2]=='u'&&flog==0&&i==x)
       {printf("ru");
       i+=2;
       flog=1;}
     else if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3==strlen(pp))
     {printf(".ru");
      i+=2;
      flag=1;}
      else if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3!=strlen(pp))
      {printf(".ru/");
      i+=2;
      flag=1;}
  }

    return 0;
}

#include <stdio.h>

int main () {

    char dir[50];
    int c,ban=1;

    scanf("%s",dir);
    char *p=dir;
    if(dir[0]=='f')
        {
            printf("ftp://");
            p+=3;
        }
    else
        {
            printf("http://");
            p+=4;
        }

    while (*p!='\0')
    {
        if(*p=='r' && ban==1)
        {
            p++;
           if( *p=='u')
            {
                printf(".ru/");
                ban=0;
                p++;
            }else
                p--;
        }
        printf("%c",*p);
        p++;

    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void strcatchar(char *principio,char texto);
void link(char texto[56]);

int main ()
{
    char texto[56];
    scanf("%s",texto);
    link(texto);
    return 0;
}

void link(char texto[56])
{
    char principio[56]="";
    int i,largo;
    largo=strlen(texto);
    if(texto[0]=='h')
    {
        strncpy(principio,texto,4);
        i=4;
    }
    else if(texto[0]=='f')
    {
        strncpy(principio,texto,3);
        i=3;
    }
    strcat(principio,"://");
    int pos;
    pos=strstr(texto,"ru")-texto;
    for(i;i<pos;i++)
    {
        strcatchar(principio,texto[i]);
    }
    strcat(principio,".ru");
    i=i+2;
    if(i<largo)
        strcatchar(principio,'/');
    for(i;i<largo;i++)
    {
        strcatchar(principio,texto[i]);
    }
    printf("%s",principio);
}

void strcatchar(char *principio,char texto)
{
    int largo=strlen(principio);
    principio[largo]=texto;
    principio[largo+1]='\0';
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define S 50

int main (void) {
  int i = 0;
  char buf[S + 2];
  fgets (buf, S + 2, stdin);
  i += printf ("%s", buf[i] == 'f' ? "ftp://" : "http://") - 3;
  i += printf ("%.*s", (int) (strstr (buf, "ru") - (buf + i)), buf + i);
  i += printf (".ru/") - 2;
  printf ("%s", buf + i);
  exit (EXIT_SUCCESS);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

const char http[]="http";
const char ftp[]="ftp";
const char ru[]="ru";

void findprotocol(char* str) {
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr=NULL;
    ptr=strstr(str,ftp);
    if (ptr!=NULL) {
        if ((ptr-str)==0) {
            strncpy(buffer1,str+3,strlen(str)-3+1);
            str[3]=':';str[4]='/';str[5]='/';
            strncpy(str+6,buffer1,strlen(buffer1)+1);
        }
    } else {
        strncpy(buffer1,str+4,strlen(str)-4+1);
        str[4]=':';str[5]='/';str[6]='/';
        strncpy(str+7,buffer1,strlen(buffer1)+1);
    }
}

void finddomainandcontext(char* str) {
    int pos;
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr;
    ptr=strstr(str,ru);
    pos=ptr-str;
    if (str[pos-1]=='/') {
        ptr=strstr(str+pos+3,ru);
    }
    pos=ptr-str;
    strncpy(buffer1,str+pos,strlen(str)-pos+1);
    str[ptr-str]='.';
    strncpy(str+pos+1,buffer1,strlen(buffer1)+1);
    free(buffer1);
    buffer1=calloc(100,sizeof(char));
    if (pos+3!=strlen(str)) {
        strncpy(buffer1,str+pos+3,strlen(str)-pos-3+1);
        str[ptr-str+3]='/';
        strncpy(str+pos+4,buffer1,strlen(buffer1)+1);

    }
}

int main() {
    char input[100];
    scanf("%s",input);
    findprotocol(input);
    finddomainandcontext(input);
    printf("%s",input);
    return (0);
}

/* Programa que lee una cadena de hasta 50 caracteres y lo despliega como
    una direccion IP.
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define CARACTERES 50
int posExtension(int indice, char string[CARACTERES]);

int main(){
    /* Declaración de variables */
    char string[CARACTERES];
    int indice = 0;
    int pos;
    /* Lectura de variables */
    scanf("%s", string);

    while(string[indice]!='p')
        printf("%c", string[indice++]);

        printf("%c://", string[indice++]);

    /* Suma dos posiciones para evitar que el dominio sea tomado
        como la extension ru.
    */
    pos = posExtension(indice+2, string);

    while(indice!=pos)
        printf("%c", string[indice++]);

    printf(".ru");

    /* Suma dos unidades para obviar la extension .ru */
    indice += 2;

    while(indice != strlen(string)){
        printf("%c", string[indice++]);
        printf("/");
    }

        return 0;
}

int posExtension(int indice, char string[CARACTERES]){
    int i;
    i=indice;
    do{
        while(string[i++]!='r');
    }while(string[i++]!='u');
    /* Resta las posiciones de ru */
    return i-2;

}

#include <stdio.h>
#include <string.h>

int buscar(char a[], int i);
void dominio( char a[], char b[], int y, int x );
void contexto( char a[], char b[], int x);
void concatenar(char a[], char b[], char c[]);

int main()
{
    char cadena1[60];
    char protocol[5];
    char domain[50];
    char context[50];
    int i, pos = 0, aux = 0;

    scanf("%s", cadena1);

    if( cadena1[0] == 'f' )
    {
        for( i = 0; i < 3; i++)
        {
            protocol[i] = cadena1[i];
            pos++;
        }

        aux = buscar( cadena1, strlen(cadena1) );
        dominio(cadena1, domain, pos, aux);
        contexto(cadena1, context, aux+3);
        concatenar(protocol, domain, context);
    }
    else
    {
        for( i = 0; i < 4; i++)
        {
            protocol[i] = cadena1[i];
            pos++;
        }

        aux = buscar( cadena1, strlen(cadena1) );
        dominio(cadena1, domain, pos, aux);
        contexto(cadena1, context, aux+3);
        concatenar(protocol, domain, context);
    }

    return 0;
}

int buscar(char a[], int i)
{
    int val = 0;
    i--;
    while ( i > 5)
    {
        if(a[i] == 'u')
        {
            if(a[i-1] == 'r'){
                val = i-2;
            }else
                i--;
        }
        else
        {
            i--;
        }
        if (val != 0)
            break;
    }
    return val;
}

void dominio( char a[], char b[], int y, int x )
{
    int j = 0;
        while( y <= x )
        {
            b[j] = a[y];
            y++;
            j++;
        }
}

void contexto( char a[], char b[], int x)
{
    int i = 0;
    char s[] = "";
    if( x != strlen(a)+1)
    {
        while( x < strlen(a)+1 )
        {
            b[i] = a[x];
            x++;
            i++;
        }
    }else
        strcmp(b, s);
}

void concatenar(char a[], char b[], char c[])
{
    char cad1[] = "://";
    char cad2[] = ".ru";
    char cad3[] = "/";
    char x[70];
    char w[] = "";
    strcpy(x, w);
    strcat(x, a);
    strcat(x, cad1);
    strcat(x, b);
    strcat(x, cad2);
    if ( strcmp(w, c) != 0 )
    {
        strcat(x, cad3);
        strcat(x, c);
    }
    printf("%s", x);
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void strcatchar(char *principio,char texto);
void link(char texto[56]);

int main ()
{
    char texto[56];
    scanf("%s",texto);
    link(texto);
    /*printf("%s",texto);*/
    return 0;
}

void link(char texto[56])
{
    char principio[56]="";
    int i,largo;
    largo=strlen(texto);
    if(texto[0]=='h')
    {
        strncpy(principio,texto,4);
        i=4;
    }
    else if(texto[0]=='f')
    {
        strncpy(principio,texto,3);
        i=3;
    }
    strcat(principio,"://");
    int pos;
    pos=strstr(texto,"ru")-texto;
    for(i;i<pos;i++)
    {
        strcatchar(principio,texto[i]);
    }
    strcat(principio,".ru/");
    i=i+2;
    for(i;i<largo;i++)
    {
        strcatchar(principio,texto[i]);
    }
    printf("%s",principio);
}

void strcatchar(char *principio,char texto)
{
    int largo=strlen(principio);
    principio[largo]=texto;
    principio[largo+1]='\0';
}

#include<stdio.h>
#include<string.h>

void url(char cadena[],int i);

int main() {
char cadena[50];
int i;
fflush(stdin);
gets(cadena);
    if(cadena[0]=='f'){
        for(i=0;i<3;i++){
            printf("%c", cadena[i]);
        }
        url(cadena,i);
    }
      else if(cadena[0]=='h'){
        for(i=0;i<4;i++){
            printf("%c", cadena[i]);
        }
        url(cadena,i);
        }
    return 0;
}

void url(char cadena[], int i){
 int flag=0;
 printf("://");
        while(flag==0){
            if(cadena[i]!='r' && cadena[i+1]!='u'){
            printf("%c",cadena[i]);
            i++;
            }
            else{
                printf(".%c%c/", cadena[i],cadena[i+1]);
                flag=-1;
                i=i+2;
            }
        }
            while(cadena[i]!='\0'){
                printf("%c",cadena[i]);
                i++;
            }
}

#include <stdio.h>
#include <stdlib.h>
// ftp = 7 http = 5

int controlar(char *c1, char *c2)
{
    int i=0;

    if(c1[0]=='r' && c2[0]=='u')
    {
        i=1;
    }else
    {
     i=0;
    }
    return i;
}
int main()
{
   char dir_err[51];
   int n,r;
   n=r=0;
   scanf("%s",dir_err);
   if (dir_err[n]=='h')
   {
       printf("http://");
       n=4;
   }else if (dir_err[n])
   {
       printf("ftp://http");
       n=7;
   }

   do
   {

           printf("%c",dir_err[n]);
           n++;

   }while(0==controlar(&dir_err[n],&dir_err[n+1]) );
   printf(".ru");
   n=n+2;
   if(dir_err[n]!='\0')
   {
        printf("/");
        do{
           printf("%c",dir_err[n]);
           n++;
       }while(dir_err[n]!='\0');

   }
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[60],*p,h[5]="http",f[4] ="ftp";
    int i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    for(i =0;i<3;i++)
    {
        if(s[i]!=f[i])
        {
            break;
        }
    }
    p =strstr(s,"ru");
    if(i ==3)
    {
        printf("%s://",f);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    else
    {
        i =4;
        printf("%s://",h);
        p =strstr(s,"ru");
        for(;i<p-s;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        ++p;
        ++p;
        if(*p)
        {
            int len =strlen(s);
            printf("/");
            for(;p<s+len;p++)
            {
                printf("%c",*p);
            }
        }
    }
    return  0;
}

#include<stdio.h>
#include <string.h>

int main()
{
    char direccion[56];
    int i;
    int punto;

    scanf("%s", direccion);

    if(direccion[0] == 'h')
    {
        for(i=strlen(direccion); i >= 4; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[4] = ':';
        direccion[5] = '/';
        direccion[6] = '/';
    }
    else
    {
        for(i=strlen(direccion); i >= 3; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[3] = ':';
        direccion[4] = '/';
        direccion[5] = '/';
    }
    punto = strstr(direccion,"ru") - direccion;
    for(i=strlen(direccion); i >= punto; i--)
    {
        direccion[i+1] = direccion[i];
    }
    direccion[punto] = '.';

    for(i=strlen(direccion); i >= punto+3; i--)
    {
        direccion[i+1] = direccion[i];
    }
    direccion[punto+3] = '/';

    printf("%s", direccion);
    return 0;
}

#include<stdio.h>
int main()
{
    char a,b;
    int i,done,once;
    done = 0;
    once = 0;
    a=getchar();
    if(a=='h')
    {
        for(i=0;i<4;i++)
        {
            printf("%c",a);
            a=getchar();
        }
    }
    if(a=='f')
    {
        for(i=0;i<3;i++)
        {
            printf("%c",a);
            a=getchar();
        }
    }
    printf("://");
    while(a!='\n')
    {
        if(a!='r' && done == 0 )
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done != 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a!='r' && done != 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done == 0 && once == 0)
        {
            printf("%c",a);
            once = 1;
            a=getchar();
        }
        else if(a=='r' && done == 0 && once == 1)
        {
            b = getchar();
            if(b=='u')
            {
                printf(".ru/");
                done = 1;
                a=getchar();
            }
            else if(b!='u')
            {
                printf("%c",a);
                once = 1;
                a=b;
            }
        }
    }
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char direccion[56];
    char aux[51];
    int i;
    int punto;

    scanf("%s", direccion);

    if(direccion[0] == 'h')
    {
        for(i=strlen(direccion); i >= 4; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[4] = ':';
        direccion[5] = '/';
        direccion[6] = '/';
    }
    else
    {
        for(i=strlen(direccion); i >= 3; i--)
        {
            direccion[i+3] = direccion[i];
        }
        direccion[3] = ':';
        direccion[4] = '/';
        direccion[5] = '/';
    }

    for(i=8; direccion[i]!='\0'; i++)
    {
        aux[i-8]= direccion[i];
    }

    punto = strstr(aux,"ru") - aux + 8;

    for(i=strlen(direccion); i >= punto; i--)
    {
        direccion[i+1] = direccion[i];
    }

    direccion[punto] = '.';

    for(i=strlen(direccion); i >= punto+3; i--)
    {
        direccion[i+1] = direccion[i];
    }
    direccion[punto+3] = '/';

    printf("%s", direccion);
    return 0;
}

#include<stdio.h>
#include<string.h>
#define maxn 1000
int main()
{
    int i,j,mark=0,len;
    char a[maxn],m[10]={'r','u'};
    scanf("%s",a);
    len=strlen(a);
    for(i=0;i<=len-2;i++)
    {
        for(j=0;j<2;j++)
        {
            if(a[i+j]!=m[j])
                break;
        }
        if(j==2)
        {
            mark=i;
            break;
        }
    }
    if(a[2]=='t')
    {
        printf("http://");
        for(i=3;i<mark;i++)
            printf("%c",a[i]);
        printf(".ru");
        if(len!=mark+2)
        {
            printf("/");
            for(i=mark+2;i<len;i++)
                printf("%c",a[i]);
        }
    }
    else
    {
        printf("ftp://");
        for(i=3;i<mark;i++)
            printf("%c",a[i]);
        printf(".ru");
        if(len!=mark+2)
        {
            printf("/");
            for(i=mark+2;i<len;i++)
                printf("%c",a[i]);
        }
    }
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main()
{
  char input[50];

  char *domain = (char *) malloc(50);
  char *subDomain = (char *) malloc(50);
  int i, k, domainPos, subDomainPos;
  scanf("%s",input);
  if(input[0]=='h')
  {
    printf("http://");
    k = 4;
  }else
  {
    printf("ftp://");
    k = 3;
  }
  for (i = 50 - 1; i >= k ; i--)
  {
    if(input[i-1] == 'r' && input[i] == 'u')
     {

      domainPos = i - 1;
      subDomainPos = i + 1;
      break;
     }
  }
  strncpy(domain,&input[k], domainPos - k);
  strcpy(subDomain,&input[subDomainPos]);
  printf("%s",domain);
  printf(".ru");
  if(strcmp(subDomain,""))
    printf("/%s\n",subDomain);

  return(0);

}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main()
{
  char input[50];

  char *dom = (char *) malloc(50);
  char *subDomain = (char *) malloc(50);
  int i, k, domainPos, subDomainPos;
  scanf("%s",input);
  if(input[0]=='h')
  {
    printf("http://");
    k = 4;
  }else
  {
    printf("ftp://");
    k = 3;
  }
  for (i = 50 - 1; i >= k ; i--)
  {
    if(input[i-1] == 'r' && input[i] == 'u')
     {

      domainPos = i - 1;
      subDomainPos = i + 1;
      break;
     }
  }
  strncpy(dom,&input[k], domainPos - k);
  strcpy(subDomain,&input[subDomainPos]);
  printf("%s",dom);
  printf(".ru");
  if(strcmp(subDomain,""))
    printf("/%s\n",subDomain);

  return(0);

}

#include <stdio.h>
#include <string.h>
int main(){
	int i;
	char a[51];
	scanf("%s", a);
	if (a[0] == 'f'){
		printf("ftp://");
		for(i=3;i<5;i++)
		printf("%c",a[i]);
		for (i = 5; a[i]!='r'||a[i+1]!='u'; i++){
			printf("%c", a[i]);
		}
		printf(".ru");
		i+=2;
		if(i<strlen(a))
		printf("/");
		for (; i < strlen(a); i++)
			printf("%c", a[i]);
	}
	else{
		printf("http://");
		for(i=4;i<6;i++)
		printf("%c",a[i]);
		for (i = 6; a[i] != 'r' || a[i + 1] != 'u'; i++){
			printf("%c", a[i]);
		}
		printf(".ru");
		i+=2;
		if(i<strlen(a));
		printf("/");
		for (; i < strlen(a); i++)
			printf("%c", a[i]);
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[100]="";
    int pos,i;
//    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    pos = 'h'==s[0] ? 4 : 3;
    for(i =0;i<pos;i++)
    {
        printf("%c",s[i]);
    }
    printf("://");
    for(;i<strlen(s);i++)
    {
        if(s[i] =='r'&&s[i+1] =='u')
        {
            break;
        }
    }
    for(;pos<i;pos++)
    {
        printf("%c",s[pos]);
    }
    printf(".ru");
    pos +=2;
    if(s[pos])
    {
        printf("/");
        for(;pos<strlen(s);pos++)
        {
            printf("%c",s[pos]);
        }
    }
    printf("\n");
    return 0;
}

#include <stdio.h>

int main()
{
    int i;
    char DirWeb[50];
    char aux[53]="";
    char s[55]="";
    gets(DirWeb);
    int p,c,flag=0;
    if(DirWeb[0]=='h')
    {
        strcpy(aux,"http://");
        Cpy(aux,DirWeb,4,3);
        p=7;
    }else if(DirWeb[0]=='f')
    {
        strcpy(aux,"ftp://");
        Cpy(aux,DirWeb,3,3);
        p=6;
    }

    for(i=p;aux[i]!='\0';i++)
    {
        if(aux[i]=='r' && aux[i+1]=='u' && flag==0)
        {
            strncat(s,aux,i);
            strcat(s,".ru/");
            c=i+2;
            Cpy(s,aux,c,2);
            flag=1;
        }
    }
        puts(s);

    return 0;
}

void Cpy(char *str1,char *str2,int a,int b)
{
    int i;
        for(i=a;(str1[i+b]=str2[i])!='\0';i++)
        {
          str1[i+b]=str2[i];
        }
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

const char http[]="http";
const char ftp[]="ftp";
const char ru[]="ru";

void findprotocol(char* str) {
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr=NULL;
    ptr=strstr(str,ftp);
    if (ptr!=NULL) {
        if ((ptr-str)==0) {
            strncpy(buffer1,str+3,strlen(str)-3+1);
            str[3]=':';str[4]='/';str[5]='/';
            strncpy(str+6,buffer1,strlen(buffer1)+1);
        }
    } else {
        strncpy(buffer1,str+4,strlen(str)-4+1);
        str[4]=':';str[5]='/';str[6]='/';
        strncpy(str+7,buffer1,strlen(buffer1)+1);
    }
}

void finddomainandcontext(char* str) {
    int pos;
    char* buffer1=NULL;
    buffer1=calloc(100,sizeof(char));
    char* ptr;
    ptr=strstr(str,ru);
    pos=ptr-str;
    strncpy(buffer1,str+pos,strlen(str)-pos+1);
    str[ptr-str]='.';
    strncpy(str+pos+1,buffer1,strlen(buffer1)+1);
    free(buffer1);
    buffer1=calloc(100,sizeof(char));
    if (pos+3!=strlen(str)) {
        strncpy(buffer1,str+pos+3,strlen(str)-pos-3+1);
        str[ptr-str+3]='/';
        strncpy(str+pos+4,buffer1,strlen(buffer1)+1);

    }
}

int main() {
    char input[100];
    scanf("%s",input);
    findprotocol(input);
    finddomainandcontext(input);
    printf("%s",input);
    return (0);
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[1000]="";
    int pos,i;
//    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    pos = 'h'==s[0] ? 4 : 3;
    for(i =0;i<pos;i++)
    {
        printf("%c",s[i]);
    }
    printf("://");
    for(;i<strlen(s);i++)
    {
        if(s[i] =='r'&&s[i+1] =='u')
        {
            break;
        }
    }
    for(;pos<i;pos++)
    {
        printf("%c",s[pos]);
    }
    printf(".ru");
    pos +=2;
    if(s[pos])
    {
        printf("/");
        for(;pos<strlen(s);pos++)
        {
            printf("%c",s[pos]);
        }
    }
    printf("");
    return 0;
}

#include<stdio.h>
#include<ctype.h>
int main(){
int i,don=3,pun=0,j=0;
char direccion[51];
scanf("%s",direccion);
i=0;
if(direccion[0] == 'h'){
    don = 4;
}
while(direccion[i]!=0){
    if((direccion[i] <= 'a' || direccion[i] >= 'z')){ //Verifica que sean letras y minusculas
        return 0;
    }
    i++;
}
i=0;
while(direccion[i]!=0){
    if(pun==0 && direccion[i] == 'r' && direccion[i+1] == 'u'){
        printf(".");
        pun++;
    }
    if(don == 0){
        printf("://");
    }
    printf("%c",direccion[i]);
    if(pun == 1 && direccion[i]=='u'){
        pun++;
        printf("/");
    }
    don=don-1;
    i++;
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
char cadena[50];
int main(){
    int i,c,h;
    scanf("%s",cadena);
    if(cadena[0]=='h'){
        c=4;
    }else{
        c=3;
    }
    int k=0;
    for(i=0;cadena[i]!='\0';i++){
        if(cadena[i]=='r' &&cadena[i+1]=='u' && k==0){
            printf(".");
            h=i+2;
            k=1;
        }
        if(i==c){
            printf("://");
        }
        if(i==h){
            printf("/");
        }
        printf("%c",cadena[i]);
    }
return 0;
}

#include<stdio.h>
#include<string.h>
#include<string.h>
int main()
{
    char s[70],*p;
    int i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    if(s[0] =='h')
    {
        for(i =0;i<4;i++)
        {
            printf("%c",s[i]);
        }
        printf("://");
        p =strstr(s,"ru");
        for(;i+s<p;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        p =p+2;
        if(*p)
        {
            printf("/");
            for(;p<s+strlen(s);p++)
            {
                printf("%c",*p);
            }
            printf("\n");
        }
    }
    else
    {
        for(i =0;i<3;i++)
        {
            printf("%c",s[i]);
        }
        printf("://");
        p =strstr(s,"ru");
        for(;i+s<p;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        p =p+2;
        if(*p)
        {
            printf("/");
            for(;p<s+strlen(s);p++)
            {
                printf("%c",*p);
            }
        }
    }
    printf("\n");
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	int x,y,z=0,i,j,a=1,b=1;
	char arr[100];
	scanf("%s",arr);
	for(i=0 ; i<strlen(arr) ; i++)
	{
		if(arr[i]=='p' && a==1)
		{
			a=0;
			x=i;
			for(j=0 ; j<=i ; j++)
				printf("%c",arr[j]);
			printf("://");
		}
		if(a==0 && b==1 && arr[i]=='r' && arr[i+1]=='u' && arr[i-1]!='p')
		{
			for(j=x+1 ; j<i ; j++)
				printf("%c",arr[j]);
			printf(".ru/");
			b=0;
			for(y=i+2 ; y<strlen(arr) ; y++)
				printf("%c",arr[y]);
			break;
		}
	}
		return 0;
}

#include <stdio.h>

// ftp = 7 http = 5

int controlar(char *c1, char *c2,int op)
{
    int i=0;

    if(c1[0]=='r' && c2[0]=='u' && op!=1)
    {
        i=1;
    }else
    {
     i=0;

    }
    return i;
}
int main()
{
   char dir_err[51];
   int n,r,op;
   n=r=op=0;
   scanf("%s",dir_err);

       if (dir_err[n]=='h')
       {

            printf("http://");
            n=4;
            if (dir_err[n]=='r' && dir_err[n+1]=='u'){op++;}
       }else if (dir_err[n]=='f')
       {

           if (dir_err[3]=='h')
           {
            printf("ftp://http");
            n=7;
           }else
           {
            printf("ftp://");
            n=3;
           }
       }
    while(0==controlar(&dir_err[n],&dir_err[n+1],op) ){

               printf("%c",dir_err[n]);
               n++;
               op++;

    }

       printf(".ru");
       n=n+2;
       if(dir_err[n]!='\0')
       {
            printf("/");
            do{
               printf("%c",dir_err[n]);
               n++;
           }while(dir_err[n]!='\0');

       }

}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[70];
    int pos,i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    pos = 'h'==s[0] ? 4 : 3;
    for(i =0;i<pos;i++)
    {
        printf("%c",s[i]);
    }
    printf("://");
    for(;i<strlen(s);i++)
    {
        if(s[i] =='r'&&s[i+1] =='u')
        {
            break;
        }
    }
    for(;pos<i;pos++)
    {
        printf("%c",s[pos]);
    }
    printf(".ru");
    pos +=2;
    if(s[pos])
    {
        printf("/");
        for(;pos<strlen(s);pos++)
        {
            printf("%c",s[pos]);
        }
    }
    printf("\n");
    return 0;
}

#include<stdio.h>
int main()
{
int i,j,k,x=0,flag=0;
char pp[51];
gets(pp);
if(pp[0]=='f')
 { printf("ftp://");
  x=3;}
else
  {printf("http://");
   x=4;}
for(i=x;i<strlen(pp);i++)
  { printf("%c",pp[i]);
    if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0)
     {printf(".ru/");
      i+=2;
      flag=1;}
  }

    return 0;
}

#include <stdio.h>
#include <string.h>
int main()
{
	int h,w,i,j;
	char str[51];
	scanf("%s",str);
	w=strlen(str);
	h=0;
	if (str[0]=='h'){
		printf("http://");
		h=h+4;
		for (i=h;str[i]!='r' || str[i+1]!='u';i++){
			printf("%c",str[i]);
			h=h+1;
		}
		printf(".ru");
		h=h+2;
		if(h<w){
			printf("/");
			for (j=h;j<w;j++){
				printf("%c",str[j]);
			}
		}
	}
	else if (str[0]=='f'){
		printf("ftp://");
		h=h+3;
		for (i=h;str[i]!='r' || str[i+1]!='u';i++){
			printf("%c",str[i]);
			h=h+1;
		}
		printf(".ru");
		h=h+2;
		if(h<w){
			printf("/");
			for (j=h;j<w;j++){
				printf("%c",str[j]);
			}
		}
	}

	return 0;
}

#include<stdio.h>
#include<string.h>
#include<string.h>
int main()
{
    char s[1000],*p;
    int i;
    memset(s,'\0',sizeof(s));
    scanf("%s",s);
    if(s[0] =='h')
    {
        for(i =0;i<4;i++)
        {
            printf("%c",s[i]);
        }
        printf("://");
        p =strstr(s,"ru");
        for(;i+s<p;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        p =p+2;
        if(*p)
        {
            printf("/");
            for(;p<s+strlen(s);p++)
            {
                printf("%c",*p);
            }
            printf("\n");
        }
    }
    else
    {
        for(i =0;i<3;i++)
        {
            printf("%c",s[i]);
        }
        printf("://");
        p =strstr(s,"ru");
        for(;i+s<p;i++)
        {
            printf("%c",s[i]);
        }
        printf(".ru");
        p =p+2;
        if(*p)
        {
            printf("/");
            for(;p<s+strlen(s);p++)
            {
                printf("%c",*p);
            }
        }
    }
    printf("\n");
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#define MAXM 0x7fffffff
#define Max(a,b)((a)>(b)?(a):(b))
#define Min(a,b) ((a)>(b)?(b):(a))
#define INF 0x7ffffff
#define hash_mod 1111111
#define eps 1e-6
#define reset(a) memset(a,0,sizeof(a))
#define ret(a) memset(a,-1,sizeof(a))
#define lson  l,m,rt<<1
#define rson  m+1,r,rt<<1|1
#define demid int m=(l+r)>>1
#define ebug
int main()
{
  char str[55];
  char* http = "http",*ftp = "ftp";
  while(~scanf("%s",str))
  {
      int i,l,f = 0;
      l = strlen(str);
      if(strncmp(str,http,4)==0)
      {
          printf("%s",http);
          printf("://");
          for(i = 4;i < l ; i++)
          {
              if(str[i]=='r'&&str[i+1]=='u'&& f)
              {
                  printf(".ru");i+=2;
                  break;
              }
              else f = 1,printf("%c",str[i]);

          }
          if(i<l)
          printf("/%s",str+i);printf("\n");
      }
      else
      {
          printf("%s",ftp);
          printf("://");
           for(i = 3;i < l ; i++)
          {
              if(str[i]=='r'&&str[i+1]=='u')
              {
                  printf(".ru");i+=2;
                  break;
              }
              else printf("%c",str[i]);

          }
          if(i<l)
          printf("/%s",str+i);printf("\n");
      }
  }
    return 0;
}

#include<stdio.h>
#include<string.h>

int main(void){
  char str[64];
  int i,j,k,l,flg=0;
  fgets(str,sizeof(str),stdin);
  l=strlen(str);
  for(i=0;i<l;i++){
    if(str[i]=='t' && str[i+1]=='p' && flg==0){
      printf("tp://");
      i++;
      flg=1;
    }else if(str[i]=='r' && str[i+1]=='u' && flg==1){
      printf(".ru");
      if(str[i+2]!='\n') putchar('/');
      i++;
      flg=2;
    }else putchar(str[i]);
  }
  return 0;
}

#include<stdio.h>
#include<ctype.h>
int main(){
int i,don=3,pun=0,j=0;
char direccion[51];
char dir[56]={};
scanf("%s",direccion);
i=0;
while(direccion[i]!='\0'){
    if((direccion[i] <= 'a' || direccion[i] >= 'z')){ //Verifica que sean letras y minusculas
        return 0;
    }
    i++;
}
i=0;
if(direccion[0] == 'h'){
    don = 4;
}
while(direccion[i]!='\0'){
    if(pun==0 && direccion[i] == 'r' && direccion[i+1] == 'u'){
        dir[j]='.';
        pun++;
        j++;
    }
    if(don == 0){
        dir[j]=':';
        j++;
        dir[j]='/';
        j++;
        dir[j]='/';
        j++;
    }
    dir[j] =direccion[i];
    j++;
    if(pun == 1 && direccion[i]=='u'&& direccion[i+1]!='\0'){
        pun++;
        dir[j]='/';
        j++;
    }
    don=don-1;
    i++;
    }
    printf("%s",dir);
    return 0;
}

#include <stdio.h>

int main () {

    char dir[50];
    int c,ban=1;

    scanf("%s",dir);
    char *p=dir;
    if(dir[0]=='f')
        {
            printf("ftp://");
            p+=3;
        }
    else
        {
            printf("http://");
            p+=4;
        }

    while (*p!='\0')
    {
        if(*p=='r' && ban==1)
            {
                printf(".ru/");
                ban=0;
                p+=2;
            }
            printf("%c",*p);

        p++;

    }
    return 0;
}

#include <stdio.h>
#include <string.h>
int main()
{
    char s[55];
    int i,k,len,f;
    while(gets(s))
    {
        len=strlen(s);
        if(s[0]=='h')
        {
            for(i=0;i<4;i++)
            printf("%c",s[i]);
            printf("://");
            k=4;
        }
        else
        if(s[0]=='f')
        {
            for(i=0;i<3;i++)
            printf("%c",s[i]);
            printf("://");
            k=3;
        }
        for(i=k,f=0;i<len;i++)
        {
            if(i!=k&&i!=k+1&&s[i]=='r'&&s[i+1]=='u'&&f==0)
            {
                printf(".ru");f=1;i=i+2;
                if(i<len)
                printf("/");
                else
                break;
            }
            printf("%c",s[i]);
        }
        printf("\n");
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int isru(char *a)
{
    if(*a=='r'&&*(a+1)=='u')
        return 1;
    else
        return 0;
}
int main()
{
    int i,j,k,l,m,n,t,o,p,q;
    int a[1000],b[1000];
    char s[100];
    scanf("%s",s);
        if(s[0]=='f')
        {
            printf("ftp://");
            i=3;
        }
        else
        {
            printf("htttp://");
            i=4;
        }
        for(;s[i];i++)
        {
            if(!isru(&s[i]))
                printf("%c",s[i]);
            else
            {
                printf(".ru");
                i+=2;
                break;
            }
        }
        if(s[i])
        {
            printf("/");
            while(s[i])
            {
                printf("%c",s[i]);
                i++;
            }
        }
        printf("\n");

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
main()
{
    int i,len;
    char origin[50];
    char *aux =NULL;
    scanf("%s", origin);
    aux=strstr(origin, "http");
    if(aux!=NULL)
    {
        printf("http://");
    }
    if(aux==NULL)
    {
        printf("ftp://");
    }
    aux=strstr(origin,"p");
    i=1;
    while(strncmp(aux+i, "ru", 2)!=0)
    {
        printf("%c", *(aux+i));
        i++;
    }
    printf(".ru");
    aux=strstr(origin, "ru");
    len=strlen(aux+2);
    if(len>0)
    {
        printf("/");
        for(i=2;i<len+2;i++)
        {
            printf("%c", *(aux+i));
        }
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv)
{
	char input[60], output[60];
	scanf("%s",&input);
	int i = 0, j = 0, counter;
	while(input[i] != 'p')
	{
		output[i] = input[i];
		i++;
		j++;
	}
	output[i] = input[i];
	i++;
	j++;
	output[i] = ':';
	output[i+1] = '/';
	output[i+2] = '/';
	i = i + 3;
	label:
	while(input[j] != 'r')
	{
		output[i] = input[j];
		j++;
		i++;
	}
	if(input[j+1] != 'u')
	{
		output[i] = input[j];
		i++;
		j++;
		goto label;
	}
	output[i] = '.';
	output[i+1] = 'r';
	output[i+2] = 'u';
	i = i + 3;
	j = j + 2;
	if(input[j] != '\0')
	{
		output[i] = '/';
		i++;
	}
	while(input[j] != '\0')
	{
		output[i] = input[j];
		i++;
		j++;
	}
	printf("%s",output);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void strcatchar(char *principio,char texto);
void link(char texto[51]);

int main ()
{
    char texto[51];
    scanf("%s",texto);
    link(texto);
    return 0;
}

void link(char texto[51])
{
    char principio[56]="";
    int i,largo;
    largo=strlen(texto);
    if(texto[0]=='h')
    {
        strncpy(principio,texto,4);
        i=4;
    }
    else if(texto[0]=='f')
    {
        strncpy(principio,texto,3);
        i=3;
    }
    strcat(principio,"://");
    int pos;
    pos=strstr(texto,"ru")-texto;
    for(i;i<pos;i++)
    {
        strcatchar(principio,texto[i]);
    }
    strcat(principio,".ru");
    i=i+2;
    if(i<largo)
        strcatchar(principio,'/');
    for(i;i<largo;i++)
    {
        strcatchar(principio,texto[i]);
    }
    principio[55]='\0';
    printf("%s",principio);
}

void strcatchar(char *principio,char texto)
{
    int largo=strlen(principio);
    principio[largo]=texto;
    principio[largo+1]='\0';
}

#include<stdio.h>
#include<stdio.h>
int main()
{
int i,a,c,d,t=0,j,q=1;
char x,arr[99];
scanf("%s",arr);
for(i=0;i<(strlen(arr));i++)
	{

	if(arr[i-1]=='p'&&t==0)
	{printf("://");

	t=1;
	}

	if(arr[i]=='r'&&arr[i+1]=='u'&&q==1)
		{
			printf(".");
			printf("ru/");
			t=2;
			q=2;
			i++;
		}

	else
		printf("%c",arr[i]);

	}
return 0;

}

#include<stdio.h>
#include<string.h>
int main()
{
int i,j,k,x=0,flag=0,flog=0;
char pp[100];
gets(pp);
if(pp[0]=='f')
 { printf("ftp://");
  x=3;}
else
  {printf("http://");
   x=4;}
for(i=x;i<strlen(pp);i++)
  { printf("%c",pp[i]);
  if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3==strlen(pp)&&x!=i)
     {printf(".ru");
      i+=2;
      flag=2;}
      else if(pp[i+1]=='r'&&pp[i+2]=='u'&&flag==0&&i+3!=strlen(pp)&&x!=i)
      {printf(".ru/");
      i+=2;
      flag=1;}
  }

    return 0;
}