Var i,k,t:longint;
    s:string;
  Begin
    Readln(s);
    t:=0;
    if s[1]='h' then begin write('http://'); t:=t+1; k:=5; end else write('ftp://');
    if t=1 then
    begin
     for i:=5 to length(s) do
     if (s[i]='r') and (s[i+1]='u' ) and(i<>5) then begin write('.ru'); k:=k+2; break; end
     else begin write(s[i]); k:=k+1; end;
     if k<=length(s) then write('/');
      for  i:=k to length(s) do
      write(s[i]);
     exit;
    end;
     if t=0 then
     begin
     k:=4;
     for i:=4 to length(s) do
     if (s[i]='r') and (s[i+1]='u' )and (i<>4) then begin write('.ru'); k:=k+2; break; end
     else begin write(s[i]); k:=k+1; end;  end;
    if k<=length(s) then write('/');
      for  i:=k to length(s) do
      write(s[i]);
     exit;
     end.

{$APPTYPE CONSOLe}
{$r-,s-,q-,i-,o+}
var
  p,i:longint;
  ans,s:string;
begin
//  assign(input,'knight.in'); reset(input);
// assign(output,'knight.out'); rewrite(output);
  readln(s);
  if pos('http',s)=1
    then begin ans:=ans+'http://'; delete(s,1,4); end
    else begin ans:=ans+'ftp://'; delete(s,1,3); end;
  for i:=1 to length(s)-1 do
    if s[i]+s[i+1]='ru'
      then p:=i;
  ans:=ans+copy(s,1,p-1)+'.'+'ru';
  delete(s,1,p+1);
  if s<>''
    then ans:=ans+'/'+s;
  writeln(ans);
  close(input);
  close(output);
end.

{$APPTYPE CONSOLE}

 var a:array[1..256] of string;
 x:string; i,d:integer;
begin
 readln(x);
if copy(x,1,3)='ftp' then begin insert('://',x,4); d:=8; end;
if copy(x,1,4)='http' then begin insert('://',x,5); d:=9; end;
for i:=d to length(x) do
 begin
  a[i]:=copy(x,i,2);
  if a[i]='ru' then begin insert('.',x,i);

  insert('/',x,i+3); break;  end;
 end;        if copy(x,length(x),1)='/' then delete(x,length(x),1);
write(x);
  // readln; readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

var i, n,x1,y1,x2,y2 ,x,y,t: integer;
    s:String;

begin
 // reset(input, 'input.txt');
 // rewrite(output, 'output.txt');
  read(s);
  if s[1]='f' then begin
    s:=copy(s,1,3)+'://'+copy(s,4,length(s)-3);
  end else begin
    s:=copy(s,1,4)+'://'+copy(s,5,length(s)-4);
  end;
  i:=length(s);
  while (s[i]<>'u') or (s[i-1]<>'r') do dec(i);
  if i<>length(s) then begin
    s:=copy(s,1,i)+'/'+copy(s,i+1,length(s)-i);
  end;

  s:=copy(s,1,i-2)+'.'+copy(s,i-1,length(s)-i+2);
  write(s);
end.

var s:string;
	a,b:byte;
begin
readln(s);
a:=pos('tp',s)+2;
insert('://',s,a);

for b:=1 to length(s) do
  if ((s[1]='f') and (s[b]='r') and (s[b+1]='u') and (b>7)) or ((s[1]='h') and (s[b]='r') and (s[b+1]='u') and (b>8)) then begin
    insert('.',s,b);
    break;
  end;
if b+2<>length(s) then insert('/',s,b+3);
writeln(s);
end.

program internet;
var
    s,res:string;
    i,lens,star,j:integer;
begin
    readln(s);
    lens:=length(s);
    if(s[1]='f')then
      begin
         res:='ftp://';
         res:=res+s[4];
         i:=5;
      end
    else
       begin
         res:='http://';
         res:=res+s[5];
         i:=6;
       end;
    while((s[i]<>'r')or(s[i+1]<>'u'))do
        begin
            res:=res+s[i];
            i:=i+1;
        end;
    res:=res+'.'+'ru';
    if(i<>lens-1)then
        begin
            res:=res+'/';
            for j:=i+2 to lens do
                res:=res+s[j];
        end;
    writeln(res);
end.

Var s,ans:String;
k:LongInt;
i:LongInt;
Begin
     Readln (s);
     ans:='';
     If s[1]='h'
     then Begin
               ans:='http://';
               Delete (s,1,4);
          End
     else Begin
               ans:='ftp://';
               Delete (s,1,3);
          End;
     If (s[Length (s)-1]='r') and (s[Length (s)]='u')
     then Begin
               ans:=ans+Copy (s,1,Length (s)-2)+'.ru';
               Writeln (ans);
               Halt (0);
          End
     else Begin
               For I:=1 to Length (s)-1 do
               If (s[i]='r') and (s[i+1]='u')
               then k:=i;
               ans:=ans+Copy (s,1,k-1)+'.ru/'+Copy (s,k+2,Length (s)-(k+1));
               Writeln (ans);
               Halt (0);
          End;
End.

var
  s,s1,s2,l,f : string;
  p,i,p1 : longint;
begin
  readln(s);
  p:=1;
  f:='';
  if s[p]='h' then begin f:=f+'http://'; p:=5; end
                else begin f:=f+'ftp://'; p:=4; end;
  s1:=copy(s,p,length(s));
  for i:=2 to length(s1) do
    if (s1[i]='r') and (s1[i+1]='u') then begin p1:=i; l:=copy(s1,1,p1-1); f:=f+l; f:=f+'.ru'; break; end;
  s2:=copy(s1,p1+2,length(s1));
  if s2=''
    then writeln(f)
    else writeln(f,'/',s2);
end.

program jjj;

{$APPTYPE CONSOLE}

uses
  SysUtils,StrUtils;

var
  subst:string;

begin
  readln(subst);
  if posex('http',subst,1)=1 then
  insert('://',subst, 5)
  else
  insert('://',subst,4);
  insert('.',subst,posex('ru',subst,pos('://',subst)+4));
  if (subst[posex('.ru',subst,posex('://',subst,1)+4)+3]<>' ') and
  (subst[posex('.ru',subst,posex('://',subst,1)+4)+3]<>'')
  then insert('/',subst,posex('.ru',subst,posex('://',subst,1)+4)+3);
  writeln(subst);
end.

program TaskB;

{$APPTYPE CONSOLE}
uses
  SysUtils;

var
  InStr: string[50];
  OutStr: string[55];
  I, N: Integer;

begin
  I := 6;
  ReadLn(InStr);
  OutStr := InStr;
  N := Pos('http', InStr);
  if N <> 1 then
  begin
    N := Pos('ftp', InStr);
    Delete(InStr, 1, 3);
    Insert('://', OutStr, 4);
  end
  else
  begin
    Delete(InStr, 1, 4);
    Insert('://', OutStr, 5);
    I := 7;
  end;
  N := Pos('ru', InStr);
  if N = 1 then
  begin
    Delete(InStr, 1, 2);
    N := Pos('ru', InStr) + 2;
  end;
  if Length(OutStr) <> (N + I + 1) then
    Insert('/', OutStr, N+2+I);
  Insert('.', OutStr, N+ I);
  WriteLn(OutStr);
  ReadLn;
end.

Program rabotayet1;
Var s:string;I:Integer;
Begin
    readln(s);
    if s[1]='h'
    then begin
             write('http://');
             Delete(s,1,4);
         end
    else begin
             write('ftp://');
             Delete(s,1,3);
         end;
    I:=1;
    Repeat
        Inc(I);
    Until (s[I]='r') and (s[I+1]='u');
    write(copy(s,1,i-1),'.ru');
    Delete(s,1,I+1);
    if s<>''
    then write('/',s)
End.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  p1, p2, i: longint;
  st, s: string;
begin

  readln(st);

  if st[1] = 'h' then begin
    p1:= 4;
  end else p1:= 3;

  for i:= p1+1 to length(st) do begin
    if (st[i] = 'u') and (st[i-1] = 'r') and (i-2 <> p1) then begin
      p2:= i-1;
      break;
    end;
  end;
  s:= copy(st, 1, p1) + '://' + copy(st, p1+1, p2-p1-1) + '.ru/'+  copy(st, p2+2, length(St)-(p2+1));
  if s[length(s)] = '/' then delete(s, length(s),1);
  writeln(s);
end.

var
 S:String;
begin
 Read(S);
 if S[1]='h' then begin
                  Write('http://');
                  Delete(S,1,4);
                  end else begin
                           Write('ftp://');
                           Delete(S,1,3);
                           end;
 Write(S[1]);
 Delete(S,1,1);
 While S[1]+S[2]<>'ru' do begin
                     Write(S[1]);
                     Delete(S,1,1);
                    end;
 Write('.ru');
 Delete(S,1,2);
if S<>'' then begin
               Write('/',S);
              end;
end.

var s,s1,s2,s3:string;
    i,j:longint;
begin
//  assign(input,'input.txt'); reset(input);
//    assign(output,'output.txt'); rewrite(output);
  readln(s);
  if pos('http',s)=1
    then
      begin
        write('http://');
        delete(s,1,4);
      end
      else
        if pos('ftp',s)=1
          then
            begin
              write('ftp://');
              delete(s,1,3);
            end;
  if pos('ru',s)=1
    then
      begin
        write('r');
        delete(s,1,1);
      end;
  for i:=1 to pos('ru',s)-1 do
    write(s[i]);
  delete(s,1,pos('ru',s)-1);
  delete(s,1,2);
  write('.ru');
  if length(s)=0 then exit;
  write('/',s);
end.

var S : string;
begin
     readln(S);
     If S[1] = 'h' then insert('://',S,5)
     else insert('://',S,4);
     If S[pos('ru',S)-1] <> '/' then insert('.',S,pos('ru',S))
     else
     begin
        delete(S,pos('/',S)+2,1);
        insert('.',S,pos('ru',S));
        insert('r',S,pos('/',S)+2);
     end;
     If pos('.ru',S) < length(S) - 2 then
        insert('/',S,pos('.ru',S)+3);
     writeln(S);
end.

{$Mode objfpc}

var
    s, x: string;

begin
  //  assign(input, 'text.inp'); reset(input);
    readln(s);
    if s[1]= 'h' then insert('://', s, 5) else insert('://',s, 4);
    if s[pos('ru', s)- 1]<> '/' then
    begin
        x:= s;
    insert('.', s, pos('ru', s))
    end else
        begin
            x:= s;
            x[pos('ru', x)]:= 's';
            insert('.', s, pos('ru', x))
        end;

    if pos('ru', x)+ 2 < length(s) then insert('/', s, pos('ru', x)+ 3);
    writeln(s);
end.

var i:integer;
    s,pr,dom,con:string;
begin
    i:=1;
    readln(s);
    pr:='';
    dom:='';
    con:='';
    repeat pr:=pr+s[i]; inc(i);
    until (pr='http') or (pr='ftp');
    repeat dom:=dom+s[i]; inc(i);
    until (s[i]+s[i+1]='ru') and (length(dom)>0);
    i:=i+2;

    while i<=length(s) do begin
      con:=con+s[i];
      inc(i);
    end;
    if length(con)>0 then writeln(pr,'://',dom,'.ru/',con)
    else writeln(pr,'://',dom,'.ru');

end.

const       fi          = '';
            fo          = '';

var
            s           : string;
            n           : longint;

procedure   enter;
    begin
            readln( s );
    end;

procedure   solve;
    var
            i , j       : longint;
    begin
            if s[ 1 ] = 'f' then i := 0 else i := 1;
            if s[ 1 ] = 'f' then delete( s , 1 , 3 ) else delete( s , 1 , 4 );
            s := '://'+s;
            if i = 1 then s := 'http'+s else s := 'ftp'+s;
            n := length( s );
            for i := 1 to n do
              begin
                if s[ i ] <> '/' then
                if ( s[ i+1 ] = 'r' ) and ( s[ i+2 ] = 'u' ) then
                  begin
                    insert( '.' , s , i+1 );
                    insert( '/' , s , i+4 );
                    break;
                  end;
              end;
            if s[ length( s ) ] = '/' then delete( s , length( s ) , 1 );
            writeln( s );
    end;

BEGIN
            assign( input , fi ); reset( input );
            assign( output , fo );rewrite( output );

            enter;
            solve;

            close( input );
            close( output );
END.

var a,a_1:string;
    b,i,num:word;
begin
readln(a);
a_1:='';
if (a[1]+a[2]+a[3])='ftp' then begin a_1:='ftp://';num:=4;end  else begin a_1:='http://'; num:=5 end;
b:=pos('ru',a);
if b=num then begin a_1:=a_1+'ru'; delete(a,b,2); b:=pos('ru',a); end;
a_1:=a_1+copy(a,num,b-num);
a_1:=a_1+'.ru';
if (b+1)<length(a) then begin
 a_1:=a_1+'/';
 for i:=b+2 to length(a) do a_1:=a_1+a[i]; end;
writeln(a_1);
end.

var i, n, ans, y: LongInt;
s, st, x: String;
begin
  Readln(s);
  if (pos('http',s)=1) then
  begin
    st:='http://';
    Delete(s,1,4);
    s:=st+s;
  end else
  begin
    st:='ftp://';
    Delete(s,1,3);
    s:=st+s;
  end;

   if pos('ru',s)=length(s)-1 then
    begin
      Delete(s,length(s)-1,2);
      s:=s+'.'+'ru';
    end else
    begin
      if s[pos('ru',s)-1]<>'/' then y:=pos('ru',s) else
      begin
        for i:=2 to length(s)-1 do
        if (s[i-1]<>'/') and (s[i]='r') and (s[i+1]='u') then break;
        y:=i;
      end;
      x:=Copy(s,y,length(s)-y+1);

      Delete(x,1,2);
      Delete(s,y,length(s)-y+1);
      s:=s+'.ru'+'/'+x;
    end;
    Writeln(s);
end.

var
  s:string;
  p:longint;
begin
  readln(s);
  if s[1]='h'
    then begin
           write('http://');
           delete(s,1,4);
         end
    else begin
           write('ftp://');
           delete(s,1,3);
         end;
  p:=pos('ru',s);
  if p=1
    then begin
           repeat
             inc(p);
           until(s[p]='r')and(s[p+1]='u');
         end;
  if p<>length(s)-1
    then writeln(copy(s,1,p-1),'.ru/',copy(s,p+2,length(s)-p-1))
    else writeln(copy(s,1,p-1),'.ru');
end.

var
s,s1:string;
t:longint;
s2:char;
begin
readln(s);
if copy(s,1,4)='http'
then begin
write('http://');
delete(s,1,4);
end
else begin
write('ftp://');
delete(s,1,3);
end;
s2:=s[1];
s[1]:='1';
t:=pos('ru',s);
s[1]:=s2;
s1:=copy(s,1,t-1);
write(s1,'.ru');
delete(s,1,t+1);
if s<>''
then write('/',s);
writeln;
end.

Var s:String;

Procedure xl;
Var i:Integer;
    t:String;
Begin
    Readln(s);
    If pos('http',s)=1 then
     Begin
      Write('http://');
      delete(s,1,4);
     End
    Else If pos('ftp',s)=1 then
     Begin
      Write('ftp://');
      delete(s,1,3);
     End;
    i:=1;
    t:='';
    While ((s[i]<>'r') or (s[i+1]<>'u')) or (i=1) do
     Begin
      t:=t+s[i];
      INc(i);
     End;
    delete(s,1,length(t)+2);
    Write(t,'.ru');
    For i:=1 to length(s) do
     Begin
      If i=1 then Write('/');
      Write(s[i]);
     End;
End;

Begin
    xl;
End.

var  a:string;
        t,t1:integer;
begin
readln(a);
t:=pos('http',a);
if t=0 then t:=100;
t1:=pos('ftp',a);
if t1=0 then t1:=100;
if t<t1 then insert('://',a,5) else insert('://',a,4);
t:=pos('ru',a);
if a[t-1]<>'/' then begin
insert('.',a,t);insert('/',a,t+3); end else begin
delete(a,t,2);
insert('.',a,pos('ru',a));
insert('ru',a,t);
insert('/',a,pos('.ru',a)+3);  end;

if a[length(a)]='/' then delete(a,length(a),1);
write(a);
end.

VAR
   s, s1: String;
   i: Integer;
BEGIN
   Read(s);
   If (s[1]+s[2]+s[3] = 'ftp')then begin Write('ftp://'); Delete(s,1,3); end
   Else begin Write('http://'); Delete(s,1,4); end;

   For i := 3 to length(s) do
       If (s[i-1]+s[i] = 'ru') then begin s1 := Copy(s,1,i-2); Write(s1,'.ru'); Delete(s,1,i); Break; end;

   If (Length(s) > 0) then Write('/',s);
END.

program n2;
   var x:integer; t,t1,t2,h,r:string;
begin
   readln(t);
   r:='';
   if t[1]='f' then begin delete(t,1,3); write('ftp://'); end
   else if t[1]='h' then begin delete(t,1,4); write('http://'); end;
   x:=pos('ru',t);
   if x=1 then begin write('ru'); delete(t,1,2); x:=pos('ru',t); end;
   t1:=t;
   t2:=t;
   delete(t2,1,x-1);
   delete(t1,x,length(t2));
   h:=t1;
   write(h);
   write('.ru');
   delete(t,1,x+1);
   if length(t)<>0 then write('/',t);
end.

{$mode objfpc}

var             s , res , t     :       string;
                n , i , p       :       integer;

begin
                readln( s );
                {SetLength( res , 100 );
                for i := 1 to 100 do res[i] := '?'; }
                if s[1] = 'f' then
                        begin
                                res := res + 'ftp://';
                                delete( s , 1 , 3 );
                        end
                else
                        begin
                                res := res + 'http://';
                                delete( s , 1 , 4 );
                        end;
                p := pos( 'ru' , s );
                if p = 1 then
                        begin
                                res := res + 'ru';
                                delete( s , 1 , 2 );
                                p := pos( 'ru' , s );
                        end;
                t := copy( s , 1 , p - 1 );
                delete( s , 1 , p + 1 );
                res := res + t + '.ru';
                write( res );
                if length( s ) > 0 then writeln( '/' , s );
end.

var
  s:string;
  i:byte;

begin
  readln(s);
  if s[1]='h' then i:=5;
  if s[1]='f' then i:=4;
  insert('://', s, i);
  i:=length(s)-1;
  while s[i]+s[i+1]<>'ru'  do dec(i);
  insert('.',s,i); inc(i,3);
  insert('/',s,i);
  if i >= length(s) then delete(s,i,1);
  writeln(s);
end.

var
   k,k1,q,i,len:longint;
   s:string;
begin
 readln(s);
 k:=pos('http',s);
 k1:=pos('ftp',s);
 if ((k<k1)or(k1=0))and(k<>0)then
  begin
   write('http://');
   k:=k+4;
  end else
 if (k1<k)or(k=0)then
  begin
   write('ftp://');
   k:=k1+3;
  end;
 len:=length(s);
 q:=pos('ru',s);
 if q=k then
  begin
   write('ru');
   delete(s,q,2);
   len:=len-2;
  end;
 q:=pos('ru',s);
 for i:=k to q-1 do write(s[i]);
 write('.ru');
 if q+2<=len then
  begin
   write('/');
   for i:=q+2 to len do write(s[i]);
  end;
end.

var  s, s1:string;
     n, i, k, kk:integer;
begin
readln(s);
s1:='://';
if s[1]='h' then insert(s1,s, 5)
            else insert(s1,s, 4);
n:=length(s);
{for i:=n to 1 do
if (s[i]='u') and(s[i-1]='r')then begin
                                  k:=i;
                                  s1:='.';
                                  insert(s1, s, i-2);
                                  s1:='/';
                                  if i<>n then insert(s1, s, i+2);
                                  break;
                                  end; }

{s1:='ru';
k:=pos(s1,s);
kk:=k;   s1:=s;
delete(s1, k, 2);
k:=pos('ru', s1);
if k=0 then k:=kk;
insert('.', s, k);
insert('/', s, k+3);}
for i:=1 to n-1 do
 if s[i]+s[i+1]='ru' then k:=i;
insert('.', s, k);
insert('/', s, k+3);
{if k<>n then begin
             s1:='.';
             insert(s1, s, k);
             s1:='/';
             insert(s1, s, k+3);
            end
        else begin
              s1:='.';
              insert(s1, s, k-1);
             end;           }
n:=length(s);
if s[n]='/' then delete(s, n, 1);
writeln(s);

end.

var
s,z:string;
begin
readln(s);
if s[1]='f' then
        begin
          z:='ftp://';
          delete(s,1,3);
        end else
        begin
          z:='http://';
          delete(s,1,4);
        end;
while pos('ru',s)=1 do
begin delete(s,1,2); z:=z+'ru'; end;
z:=z+copy(s,1,pos('ru',s)-1)+'.ru';
delete(s,1,pos('ru',s)+1);
if s<>'' then z:=z+'/'+s;
writeln(z);
end.

var
     S,S1,S2,Ans:String;
     i:Longint;
begin
     Readln(S);
     if S[1]+S[2]+S[3]='ftp' then begin
                                       Ans:=Ans+'ftp://';
                                       Delete(S,1,3);
                                    end
     else if S[1]+S[2]+S[3]+S[4]='http' then begin
                                                  Ans:=Ans+'http://';
                                                  Delete(S,1,4);
                                              end;
     i:=1;
     while i<=Length(S)-1 do
begin
     if S[i]='r' then begin
                           if S[i+1]='u' then begin
                                                   if S2<>'' then begin
                                                   Ans:=Ans+S2+'.ru';
                                                   Delete(S,1,i+1);
                                                   Break;
                                                   end
                                                   else S2:=S2+'r';
                                               end
                                         else S2:=S2+S[i];
                       end
                 else S2:=S2+S[i];
                 Inc(i);
 end;
 if S<>'' then Ans:=Ans+'/';
     Ans:=Ans+S;
     Writeln(Ans);
 end.

var  s, s1:string;
     n, i, k:integer;
begin
readln(s);
s1:='://';
if s[1]='h' then insert(s1,s, 5)
            else insert(s1,s, 4);
n:=length(s);
for i:=1 to n-1 do
 if s[i]+s[i+1]='ru' then k:=i;
insert('.', s, k);
insert('/', s, k+3);
n:=length(s);
if s[n]='/' then delete(s, n, 1);
writeln(s);

end.

program ProjectB;

{$APPTYPE CONSOLE}

var
  s : string;
begin
  readln(s);
  if (s[1] = 'h') then begin
    write('http://');
    s := copy(s, 5, length(S) - 4);
  end else begin
    write('ftp://');
    s := copy(s, 4, length(s) - 3);
  end;
  if (s[1] = 'r') and (s[2] = 'u') then begin
    write('ru');
    s := copy(s, 3, length(s) - 2);
  end;
  write(copy(s, 1, pos('ru', s) - 1), '.ru');
  //writeln(pos('ru', s));
  s := copy(s, pos('ru', s) + 2, length(s) - pos('ru', s) - 1);
  if (length(s) > 0) then
    write('/', s);
  writeln;
end.

var i,next,ppos:longint;
    s,ss:string;

begin

  readln(s);

  if pos('http',s)=1 then
    begin
      write('http://');
      next:=5;
    end
  else
    begin
      write('ftp://');
      next:=4;
    end;

  if pos('ru',s)=next then
    begin
      ss:=copy(s,next+2,length(s)+1-next-2);
      ppos:=pos('ru',ss);
      for i:=next to next+ppos do
        write(s[i]);
      write('.ru');
      if next+ppos+1+2<=length(s) then write('/');
      for i:=next+ppos+1+2 to length(s) do
        write(s[i]);
    end
  else begin
    for i:=next to pos('ru',s)-1 do
    write(s[i]);

  write('.ru');
  if pos('ru',s)+2<=length(s) then write('/');
  for i:=pos('ru',s)+2 to length(s) do
    write(s[i]);
  end;

end.

uses math;
var u:boolean;ch:char;s,ss:string;x,j,y,a,b,k,c,i,z,q,n,num:integer;
Begin
//   assign(input,'input.txt');
//   assign(output,'output.txt');
   readln(s);
   if pos('http',s)=1
   then insert('://',s,5)
   else insert('://',s,4);
   a:=0;
   for i:=4 to length(s) do
      if s[i-1]+s[i]='ru'
      then if s[i-2]<>'/'
           then Begin
                  a:=i;
                  break;
                end;
   insert('.',s,a-1);
   insert('/',s,a+2);
   if s[length(s)]='/'
   then delete(s,length(s),1);
   writeln(s);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i : integer;
  s, s1 : string;
  bool : boolean;

begin
//  reset(input, 'input.txt');
//  rewrite(output, 'output.txt');

  readln(s);
  s1 := '';
  i := 1;
  bool := false;
  while i <= length(s) do begin
    s1 := s1 + s[i];
    if (s1 = 'http') or (s1 = 'ftp') then
      s1 := s1 + '://';
    if (s[i] = 'r') and (s[i + 1] = 'u') and (not bool) and (s1 <> 'http://r') and (s1 <> 'ftp://r') then begin
      delete(s1, length(s1), 1);
      s1 := s1 + '.ru';
      inc(i, 1);
      if (length(s) > i) then begin
        s1 := s1 + '/';
      end;
      bool := true;
    end;
    inc(i);
  end;

  writeln(s1);

end.

var
	s,t:ansistring;
	i,j,n,m:longint;

Begin
	readln(s);
	for i:=1 to length(s) do
		if (copy(s,1,i)  = 'http') or (copy(s,1,i) = 'ftp') then
			begin
				write(copy(s,1,i),'://');
				delete(s,1,i);
				break;
			end;
	for i:=2 to length(s)-1 do
		if (s[i] = 'r') and (s[i+1] = 'u') then
			begin
				write(copy(s,1,i-1),'.ru');
				delete(s,1,i+1);
				if s <> '' then
					write('/',s);
				break;
			end;
end.

{$r-, s-, q-, i-, o+}
var
  s : ansistring;
  i : longint;
begin
  readln(s);
  if (s[1] = 'h') then insert('://', s, 5) else insert('://', s, 4);
  for i := length(s) - 1 downto 1 do
    if (s[i] + s[i + 1] = 'ru') then break;
  insert('.', s, i);
  insert('/', s, i + 3);
  while (s[length(s)] = '/') do delete(s, length(s), 1);
  writeln(s);
end.

var s:string;
    i:integer;
begin
   readln(s);
   if s[1]='f'
   then insert('://',s,4)
   else insert('://',s,5);
   i:=length(s)-1;
   while (s[i]<>'r')or(s[i+1]<>'u') do
      dec(i);
   insert('.',s,i);
   if length(s)>i+2
   then insert('/',s,i+3);
   writeln(s);
end.

var s,f:string;
    d:integer;
begin
 read(s);
 if s[1]='h' then begin
                   write('http://');
                   delete(s,1,4);
                  end
             else begin
                   write('ftp://');
                   delete(s,1,3);
                  end;
 if pos('ru',s)=1 then begin
                        write('ru');
                        delete(s,1,2);
                       end;
 d:=pos('ru',s);
 f:=copy(s,1,d-1);
 write(f);
 write('.');
 write('ru');
 delete(s,1,d+1);
 d:=length(s);
 if d>0 then begin
              f:=copy(s,1,d);
              write('/',f);
             end;
end.

  var s:string;
      i,l:integer;
begin
  readln(s);
//  l:=length(s);
  if s[1]='h'
    then begin write(s[1],s[2],s[3],s[4],'://'); delete(s,1,4); end
    else begin write(s[1],s[2],s[3],'://'); delete(s,1,3); end;
  i:=1;
  while not((s[i]='r')and(s[i+1]='u')and(i>1)) do
  begin
   write(s[i]);
   inc(i);
  end;
  write('.');
  write(s[i],s[i+1]);
  l:=length(s);
  if i+2<=l
    then begin
         write('/');
         for i:=i+2 to l do
           write(s[i]);
         end;
  writeln;
end.

var s,k4,k5,sn,k1,k2:string;
i,k3,d,l1,l2:longint;
begin
k1:='';k2:='';sn:='';
readlN(S);
k1:=copy(s,1,3);
k2:=copy(s,1,4);
if k1='ftp' then begin write('ftp://');delete(s,1,3);end
       else  begin write('http://');delete(s,1,4);end;

               for i:=1 to length(s)-1 do
if (s[i]='r')and(s[i+1]='u') then begin l1:=i;l2:=i+1;end;

k4:=copy(s,1,l1-1);
k5:=copy(s,l2+1,length(s)-l2);
write(k4,'.');write(s[l1],s[l2]);
if k5<>'' then write('/',k5);
 end.

var
 i,j,n,m,k,kol,ans,res:longint;
 s:ansistring;
begin
 readln(s);
 if s[1]='f' then i:=4 else i:=5;
 insert('://',s,i);
 for i:=1 to length(s)-1 do if (s[i]='r')and(s[i+1]='u') then res:=i;
 for i:=1 to res-1 do write(s[i]);
 write('.ru');
 inc(res);
 if length(s)-res>0 then
 begin
  write('/');
  for i:=res+1 to length(s) do write(s[i]);
 end;
end.

var s,p:string;
i:integer;
begin
readln(s);
if s[1]='h' then begin write('http://'); delete(s,1,4); end
else begin write('ftp://'); delete(s,1,3); end;
for i:=1 to length(s) do
if (s[i]='r') and (s[i+1]='u') and (i>1) then
break else p+=s[i];
write(p,'.ru');
delete(s,1,i+1);
if length(s)>0 then write('/',s);
end.

var
 s:string;
 f,k:longint;
begin
{ assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input);
 rewrite(output); }
 read(s);
 if s[1]='f' then
   insert('://',s,4)
 else
    insert('://',s,5);
 for f:=length(s) downto 7 do
  if (s[f]='u')and(s[f-1]='r')then
   break;
 insert('.',s,f-1);
 if f<length(s)-1 then
  insert('/',s,f+2);
write(s);
end.

Program ProblemB;
var
S,Answer, Temp : string;
i, x : integer;
begin
  readln(S);
  Answer := '';
  if S[1] = 'h' then
   begin
     Answer := Answer + 'http://';
     Temp := copy(S,6,length(S)-4);
     x := pos('ru',Temp) + 5;
     for i := 5 to (x-1) do
       begin
           Answer := Answer + S[i];
       end;
   end else
   begin
     Answer := Answer + 'ftp://';
     Temp := copy(S,5,length(S)-3);
     x := pos('ru',Temp) + 4;
     for i := 4 to (x-1) do
       begin
           Answer := Answer + S[i];
       end;
   end;
  Answer := Answer + '.ru';
  if length(S) > x+1 then
    begin
        Answer := Answer + '/';
        for i := x+2 to length(S) do
          begin
              Answer := Answer + S[i];
          end;
    end;
  writeln(Answer);
end.

var s:string;
    k:integer;
begin
   readln(s);
   if s[1]='h' then
    begin
      write('http');
      delete(s,1,4);
    end else
     begin
       write('ftp');
       delete(s,1,3);
     end;
    write('://');
    k:=pos('ru',s);
    if k=1 then
     begin
       write('ru');
       delete(s,1,2);
       k:=pos('ru',s);
       write(copy(s,1,k-1));
    write('.ru');
    delete(s,1,k+1);
    if length(s)>0 then

       write('/',s);
       exit;
     end;
    write(copy(s,1,k-1));
    write('.ru');
    delete(s,1,k+1);
    if length(s)>0 then

       write('/',s)

end.

program p1;
var s:string;
p:integer;
begin
  readln(s);
  if (copy(s,1,3)='ftp') and (p=0) then
  begin
    write('ftp://');
    delete(s,1,3);
        p:=1;
  end;
  if (copy(s,1,4)='http') and (p=0)then
  begin
    write('http://');
    delete(s,1,4);
        p:=1;
  end;
  if pos('ru',s)=1 then
  begin
    write('ru');
    delete(s,1,2);
  end;
  write(copy(s,1,pos('ru',s)-1),'.ru');
  delete(s,1,pos('ru',s)+1);
  if length(s)>0 then write('/',s);
end.

const
  fi='';
  fo='';
var
  s,res,t:string;
  i:longint;

procedure process;
begin
  read(s);
  if s[1]='h' then
  begin
    res:='http://';
    for i:=6 to length(s) do
      if s[i]+s[i+1]='ru' then break;
    res:=res+copy(s,5,i-5)+'.ru';
    t:=copy(s,i+2,length(s)-i-1);
  end
  else
  begin
    res:='ftp://';
    for i:=5 to length(s) do
      if s[i]+s[i+1]='ru' then break;
    res:=res+copy(s,4,i-4)+'.ru';
    t:=copy(s,i+2,length(s)-i-1);
  end;
  if t<>'' then res:=res+'/'+t;
  write(res);
end;

begin
  assign(input,fi); reset(input);
  assign(output,fo); rewrite(output);
  process;
end.

{$APPTYPE CONSOLE}
Var s,itog,l:string;i:LongInt;
Begin
  readln(s);
  if s[1]='h'
  then begin
        Delete(s,1,4);
        itog:='http://';
       end
  else begin
        Delete(s,1,3);
        itog:='ftp://';
       end;
  for i:=Length(s)-1 downto 1 do
    begin
      if (s[i]='r')and(s[i+1]='u')
      then begin
            l:=Copy(s,1,i-1);
            itog:=itog+l+'.ru';
            Delete(s,1,i+1);
            if s<>''
            then itog:=itog+'/'+s;
            Writeln(itog);
            Halt(0);
           end;
    end;
end.

var
 p:longint;
 s,sl:string;
begin
  read(s);
  if s[1]='f' then begin
                   write('ftp://');
                   delete(s,1,3);
                   end
              else begin
                   write('http://');
                   delete(s,1,4);
                   end;
  p:=pos('ru',s);
  if p=1 then begin
              s[1]:='~';
              p:=pos('ru',s);
              s[1]:='r';
              end;
  sl:=copy(s,1,p-1);
  write(sl,'.ru');
  delete(s,1,p+1);
  if length(s)>0 then write('/',s);
end.

var
  s,p:ansistring;
  t:longint;

begin
  readln(s);
  if (copy(s,1,3)='ftp')then begin
    p:='ftp://';
    delete(s,1,3);
  end else begin
    p:='http://';
    delete(s,1,4);
  end;
  t:=pos('ru',s);
  if (t=1)then begin
    p:=p+'ru';
    delete(s,1,2);
  end;
  t:=pos('ru',s);
  p:=p+copy(s,1,t-1)+'.ru';
  delete(s,1,t+1);
  if (length(s)<>0)then p:=p+'/'+s;
  writeln(p);
end.

const fi = '';
      fo = '';

var s: string[50];
    f: text;

procedure nhap;
begin
    assign(f, fi); reset(f);
    readln(f, s);
    close(f);
end;

procedure xuat;
var i: longint;
    sp: string[50];
begin
    assign(f, fo); rewrite(f);
    if s[1] = 'h' then
    begin
        write(f, 'http');
        delete(s, 1, 4);
    end
    else
    begin
        write(f, 'ftp');
        delete(s, 1, 3);
    end;
    write(f, '://');
    i := 1; sp := '';
    while (i = 1) or ((i <> 1) and (not((s[i] = 'r') and (s[i + 1] = 'u')))) do
    begin
        sp := sp + s[i];
        inc(i);
    end;
    write(f, sp, '.ru');
    delete(s, 1, i + 1);
    if s <> '' then write(f, '/', s);
    close(f);
end;

begin
    nhap;
    xuat;
end.

Var
        a,r:string;
        i,g,j:integer;
Begin
        Readln(a);
        if a[1]='h' then
        Begin
                r:=r+'http://';
                for i:=1 to length(a) do
                Begin
                        if (a[i]='r') and (a[i+1]='u') and (i-1<>4) then
                        Begin
                                for j:=5 to i-1 do
                                Begin
                                        r:=r+a[j];
                                End;
                                r:=r+'.ru';
                                if length(a)<>i+1 then
                                BEgin
                                        r:=r+'/';
                                        for g:=i+2 to length(a) do
                                        Begin
                                                r:=r+a[g];
                                        End;
                                End;
                                Break;
                        End;
                End;
        end
        else
        Begin
        r:=r+'ftp://';
                for i:=1 to length(a) do
                Begin
                        if (a[i]='r') and (a[i+1]='u') and (i-1<>3) then
                        Begin
                                for j:=4 to i-1 do
                                Begin
                                        r:=r+a[j];
                                End;
                                r:=r+'.ru';
                                if length(a)<>i+1 then
                                BEgin
                                        r:=r+'/';
                                        for g:=i+2 to length(a) do
                                        Begin
                                                r:=r+a[g];
                                        End;
                                End;
                                Break;
                        End;
                End;
                End;
        Writeln(r);
        Readln;
End.

program b;
var
  s,str:string;
  i,loc:longint;
begin
  readln(str);
  s:=copy(str,1,3);
  if s='ftp' then
    begin
      write('ftp://');
      str:=copy(str,4,length(str)-3);
      for i:=length(str)-1 downto 1 do
        if (str[i]='r')and(str[i+1]='u') then
          begin
            loc:=i;
            break;
          end;
      s:=copy(str,1,loc-1);
      if s<>'' then write(s,'.ru') else write('ru');
      str:=copy(str,loc+2,length(str)-loc-1);
      if str<>'' then writeln('/',str);
    end
  else
    begin
      write('http://');
      str:=copy(str,5,length(str)-4);
      for i:=length(str)-1 downto 1 do
        if (str[i]='r')and(str[i+1]='u') then
          begin
            loc:=i;
            break;
          end;
      s:=copy(str,1,loc-1);
      if s<>'' then write(s,'.ru') else write('ru');
      str:=copy(str,loc+2,length(str)-loc-1);
      if str<>'' then writeln('/',str);
    end;
end.

var
    s,res,s2:string;
    i:integer;

begin
read(s);

if s[1]='f' then
   begin
      res:=res+copy(s,1,3);
      delete(s,1,3);
   end
         else
   begin
      res:=res+copy(s,1,4);
      delete(s,1,4);
   end;
res:=res+'://';
for i:=2 to length(s)-1 do
 if ((s[i]='r') and (s[i+1]='u')) then break;
res:=res+copy(s,1,i-1)+'.ru';
delete(s,1,i+1);
if length(s)>0 then res:=res+'/'+s;
write(res);
end.

program codeforces;

{$APPTYPE CONSOLE}
{$R+ Q+ I+}

uses
  SysUtils;

var
  i,j: integer;
  s,ans,t: string;
begin
  read(s);
  if s[1]='h' then begin
    ans:=ans+'http://';
    delete(s,1,4);
  end
  else begin
    ans:=ans+'ftp://';
    delete(s,1,3);
  end;
  i:=1;
  while true do begin
    inc(i);
    t:=s[i]+s[i+1];
    if t='ru' then break;
  end;
  for j:=1 to i-1 do ans:=ans+s[j];
  ans:=ans+'.'+'ru'+'/';
  for j:=i+2 to length(s) do ans:=ans+s[j];
  if ans[length(ans)]='/' then delete(ans,length(ans),1);
  write(ans);
end.

program krok_b;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i,n,j,k:integer;
  s,v:string;

begin
readln(s);
if s[1]+s[2]+s[3]='ftp' then begin v:=v+s[1]+s[2]+s[3]+'://'; delete(s,1,3); end
                        else begin v:=v+s[1]+s[2]+s[3]+s[4]+'://'; delete(s,1,4); end;
n:=length(s);
i:=n-1;
while k<>1 do
begin
if s[i]+s[i+1]='ru' then k:=1;
i:=i-1;
end;
for j:=1 to i do v:=v+s[j];
v:=v+'.ru';
delete(s,1,i+2);
if s='' then writeln(v)
        else writeln(v+'/'+s);
end.

Var s,q:string;
    i:longint;
  begin
  readLn(s);
  if s[1]='f' then
    begin
    q:=Copy(s,4,length(s)-3);
    Delete(s,4,Length(s)-3);
    s:=s+'://';
    s:=s+q;
    end else
    begin
    q:=Copy(s,5,length(s)-4);
    Delete(s,5,Length(s)-4);
    s:=s+'://';
    s:=s+q;
    end;
  i:=length(s);
  while i>1 do
   begin
   if (s[i]='u') and(s[i-1]='r') then
   begin
   q:=copy(s,i+1,length(s)-i+1);
   delete(s,i-1,length(s)-(i-2));
   if s[i-2]='/' then
   begin
   if Length(q)=0 then s:=s+'ru' else
   begin
   s:=s+'ru/';
   s:=s+q;
   end;
   Break
   end else
   begin
   if length(q)=0 then s:=s+'.ru' else
   begin
   s:=s+'.ru/';
   s:=s+q;
   end;
   end;
   break
   end else
   i:=i-1;
   end;
   writeln(s);
  end.

var
 i,y,x,d:longint;
 s:ansistring;
begin
 readln(s);
 if s[1]='f' then begin
                   write('ftp://');
                   d:=4;
                  end
 else begin
       write('http://');
       d:=5;
      end;
 x:=pos('p',S);
 y:=pos('ru',s);
 if y=d then begin
              write('ru');
              delete(s,y,2);
              y:=pos('ru',s);
              for i:=x+1 to y-1 do
               begin
                write(s[i]);
               end;
             end
 else begin
       for i:=x+1 to y-1 do
        begin
         write(s[i]);
        end;
       end;
 write('.ru');
 if y+1<length(s) then begin
                        write('/');
                        for i:=y+2 to length(s) do
                         begin
                          write(s[i]);
                         end;
                       end;
end.

var
 s : string;
 p,i : longint;
begin
 readln(s);
 if copy(s,1,3) = 'ftp' then insert('://',s,4)
 else insert('://',s,5);

 for i := 1 to length(s) - 2 do if (copy(s,i,3) <> '/ru') and (copy(s,i+1,2)='ru') then break;

 p := i + 1;
 insert('.',s,p);

 p := pos('.ru',s);
 insert('/',s,p + 3);

 if s[length(s)] = '/' then delete(s,length(s),1);

 writeln(s);
end.

program ProjectB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var s, t: string;
k: integer;
begin
  readln(s);
  if s[1] = 'h' then
  begin
    t := copy(s, 1, 4) + '://' + s[5];
    s := copy(s, 6, length(s) - 5);
  end
  else
  begin
    t := copy(s, 1, 3) + '://' + s[4];
    s := copy(s, 5, length(s) - 4);
  end;
  //t := t + '://';
  k := pos('ru', s);
  t := t + copy(s, 1, k - 1);
  t := t + '.ru';
  if k + 1 < length(s) then
  begin
    t := t + '/' + copy(s, k + 2, length(s) - k - 1);
  end;
  writeln(t);
end.

  var s,s2:string;
    k:integer;
begin
  readln(s);
  if copy(s,1,4)='http' then begin
    s2:='http://';
    delete(s,1,4);
  end else begin
    s2:='ftp://';
    delete(s,1,3);
  end;
  s2:=s2+s[1];
  delete(s,1,1);

  s2:=s2+copy(s,1,pos('ru',s)-1)+'.ru';
  delete(s,1,pos('ru',s)+1);
  if (length(s)>0) then
    s2:=s2+'/'+s;

  writeln(s2);

end.

var
  s : string;
begin
  readln(s);
  if pos('ftp',s) = 1 then
    begin
      write('ftp://');
      delete(s,1,3);
      if pos('ru',s) = 1 then begin write('ru'); delete(s,1,2); end;
      write(copy(s,1,pos('ru',s)-1),'.ru');
      delete(s,1,pos('ru',s)+1);
      if length(s) > 0 then writeln('/',s);
    end else
    begin
      write('http://');
      delete(s,1,4);
      if pos('ru',s) = 1 then begin write('ru'); delete(s,1,2); end;
      write(copy(s,1,pos('ru',s)-1),'.ru');
      delete(s,1,pos('ru',s)+1);
      if length(s) > 0 then writeln('/',s);
    end;
end.

Program b;
var k,s:string;
    i:longint;
begin
    readln(s);
    if s[1]='f' then
        begin
            i:=4;
            repeat
                i:=i+1;
                k:=s[i]+s[i+1];
            until k='ru';
            if i+1<>length(s) then
                writeln('ftp://',copy(s,4,i-4),'.ru/',copy(s,i+2,length(s)-i-1))
                    else
                        writeln('ftp://',copy(s,4,i-4),'.ru');
        end
        else
        begin
            i:=5;
            repeat
                i:=i+1;
                k:=s[i]+s[i+1];
            until k='ru';
            if i+1<>length(s) then
                writeln('http://',copy(s,5,i-5),'.ru/',copy(s,i+2,length(s)-i-1))
                    else
                        writeln('http://',copy(s,5,i-5),'.ru');
        end
end.

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
s,link:string;
i:integer;
begin
  readln(s);
  if s[1]='f' then
    begin
    link:=Copy(s,1,3) + '://';
    for i:=5 to Length(s) do
    if Copy(s,i,2) = 'ru' then
      begin
        link:=link + copy(s,4,i-4) + '.ru/' + Copy(s,i+2,Length(s)-i-1);
        break;
      end;
      end
  else if s[1]='h' then
    begin
    link:=Copy(s,1,4) + '://';
    for i:=6 to Length(s) do
    if Copy(s,i,2) = 'ru' then
      begin
        link:=link + copy(s,5,i-5) + '.ru/' + Copy(s,i+2,Length(s)-i-1);
        break;
      end;
    end;
if link[length(link)] = '/' then link:=copy(link,1,length(link)-1);
Writeln(link);
Readln;
Readln;
END.

var
  i,p,p1 : longint;
  s : string;

begin
  readln(s);

  p:=pos('http',s);
  p1:=pos('ftp',s);
  if p=0 then p:=maxlongint;
  if p1=0 then p1:=maxlongint;

  if p1<p then insert('://',s,p1+3) else insert('://',s,p+4);

  p:=pos('ru',s);
  if s[p-1]='/' then begin
  i:=p+2;
  while i<=length(s) do begin
    if (s[i]='r') and (s[i+1]='u') then begin p:=i; break; end;
    inc(i);
  end;

  end;

  if p+1<>length(s) then insert('/',s,p+2);

  insert('.',s,p);
  writeln(s);
end.

program PrB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var i,j : longint;
    st : string;
begin
 readln(st);
 if st[1]='h' then
  begin
   for i:=1 to 4 do write(st[i]);
   write('://');
   write(st[5]);
   i:=6;
   while not ((st[i]='r') and (st[i+1]='u')) do
    begin
     write(st[i]);
     inc(i);
    end;
   write('.ru');
   if length(st)>i+1 then
    begin
     write('/');
     for j:=i+2 to length(st) do write(st[j]);
    end;
  end;
 if st[1]='f' then
  begin
   for i:=1 to 3 do write(st[i]);
   write('://');
   write(st[4]);
   i:=5;
   while not ((st[i]='r') and (st[i+1]='u')) do
    begin
     write(st[i]);
     inc(i);
    end;
   write('.ru');
   if length(st)>i+1 then
    begin
     write('/');
     for j:=i+2 to length(st) do write(st[j]);
    end;
  end;
end.

{$APPTYPE CONSOLE}

uses
  SysUtils;
var n ,suma,t,sumb,x,y,a,b,c: int64;
 i ,  j : integer;
 p : integer;
  s:string;
begin
 readln(s);
 if (s[1] = 'h') then
  insert('://',s,5)
 else
  insert('://',s,4);
 if (s[1] = 'h') then
 p :=8
 else
  p := 7;
 for i:=length(s) downto p+1 do
  if (s[i] = 'u') and (s[i-1] = 'r') then
  begin
   insert('.',s,i-1);
   p := i+1;
   break;
  end;
 if (p=length(s)) then writeln(s)
 else
 begin
  insert('/',s,p+1);
  writeln(s);
 end;
end.

var s:string;
    p:longint;
begin
 readln(s);
 if s[1]='h' then insert('://',s,5) else insert('://',s,4);
 p:=pos('ru',s);
 if (s[1]='f')and(p<=7)or(s[1]='h')and(p<=8) then begin inc(p);while (s[p]<>'r')or(s[p+1]<>'u')do inc(p);end;
 insert('.',s,p);
 insert('/',s,p+3);
 if s[length(s)]='/' then delete(s,length(s),1);
 writeln(s);
end.

const
    finp='';
    fout='';
var s,st:String;
    vt,vt1:longint;
    f,g:text;
begin
    assign(f,finp); reset(f);
    assign(g,fout); rewrite(g);
    readln(f,s);
    if s[1]='f' then insert('://',s,4)
    else insert('://',s,5);
    vt:=pos('ru',s);
    if s[vt-1]='/' then
        begin
            st:=copy(s,vt+2,length(s)-vt-1);
            vt1:=pos('ru',st); vt:=vt1+vt+1;
        end;
    insert('.',s,vt);
    if vt+2<length(s) then insert('/',s,vt+3);
    writeln(g,s);
    close(f); close(g);
end.

const fi = '';
      fo = '';
var s,s1:string;
procedure nhap;
var f:text;
begin
    assign(f,fi); reset(f);
    readln(f,s);
    close(f);
end;
procedure xl;
var x,t:longint;
    kt:boolean;
begin
    if pos('http',s)=1 then insert('://',s,5);
    if pos('ftp',s)=1 then insert('://',s,4);
    kt:=false; s1:=s; t:=0;
    while not kt do
    begin
        x:=pos('ru',s1)+t;
        if s1[x-1]<>'/' then
        begin
            insert('.',s,x); kt:=true;
            if x+2<length(s) then insert('/',s,x+3);
        end
        else
        begin
            s1:=copy(s1,x+2,length(s1)-x-1); t:=x+1;
        end;
    end;
end;
procedure xuat;
var f:Text;
begin
    assign(f,fo); rewrite(f);
    xl;
    write(f,s);
    close(f);
end;
begin
    nhap;
    xuat;
end.

var  s:string;
        t,t1:integer;
begin
readln(s);
t:=pos('http',s);
if t=0 then t:=100;
t1:=pos('ftp',s);
if t1=0 then t1:=100;
if t<t1 then insert('://',s,5) else insert('://',s,4);
t:=pos('ru',s);
if s[t-1]<>'/' then begin insert('.',s,t);insert('/',s,t+3); end else begin
delete(s,t,2);
insert('.',s,pos('ru',s));
insert('ru',s,t);
insert('/',s,pos('.ru',s)+4);  end;

if s[length(s)]='/' then delete(s,length(s),1);
write(s);
end.

var a:string[50];
begin
    readln(a);
    if a[1]='f' then begin
        write('ftp://');
        delete(a,1,3);
    end
    else begin
        write('http://');
        delete(a,1,4);
    end;
    if copy(a,1,2)='ru' then begin
        write('ru');
        delete(a,1,2);
    end;
    write(copy(a,1,pos('ru',a)-1),'.ru/');
    delete(a,1,pos('ru',a)+1);
    writeln(a);
    readln;
end.

var s,k4,k5:string;
k1,k2,i,k3,d:longint;
begin
k1:=0;k2:=0;
readlN(S);
k1:=pos('http',s);
k2:=pos('ftp',s);
if k1=0 then  begin write('ftp://');d:=3;end  else
if k2=0 then  begin write('http://');d:=4;end  else
if k1<k2 then begin write('http://');d:=4;end else
if k1>k2 then begin write('ftp://');d:=3;end;
k3:=pos('ru',s);
k4:=copy(s,d+1,k3-d-1);
k5:=copy(s,k3,2);
delete(s,1,k3+1);

write(k4);write('.',k5,'.');
 write(S);
end.

var
    s:string;
    d,i:longint;
begin
readln(s);
if (s[1]='h') and (s[2]='t') and (s[3]='t') and (s[4]='p') then begin write(s[1],s[2],s[3],s[4],'://'); d:=5; end;
if (s[1]='f') and (s[2]='t') and (s[3]='p') then begin write(s[1],s[2],s[3],'://'); d:=4; end;
while (s[d]<>'r') or (s[d+1]<>'u') do
begin
    write(s[d]);
    d:=d+1;
end;
write('.ru'); d:=d+2;
if d<=length(s) then
begin
    write('/');
    for i:=d to length(s) do
        write(s[i]);
end;
end.

Var s:string;

Begin

  readln(s);

  if pos('http',s)=1 then
                      insert('://',s,5) else

  if pos('ftp',s)=1 then
                     insert('://',s,4);

  if pos('ru',s)>0 then
                    begin
                     insert('.',s,pos('ru',s));
                     insert('/',s,pos('ru',s)+2);
                    end;

  writeln(s);

End.

var s1,s:string;
begin
readln(s);
if pos('ftp',s)=1 then begin write('ftp://'); delete(s,1,3); end
else begin write('http://'); delete(s,1,4); end;

s1:=copy(s,1,pos('ru',s)-1);
if s1='' then begin s1:='ru';

s1:=s1+copy(s,1,pos('ru',s)-1);
delete(s,1,pos('ru',s)+1);
end;
delete(s,1,pos('ru',s)+1);

write(s1,'.ru');
if s<>'' then write('/',s);
end.

program codeforces;
    var
        input , protocol , domain , context : string[50];

begin
   readln ( input );
   if ( pos ( 'http' , input ) > pos ( 'ftp' , input ) )
       then protocol := 'ftp'
       else protocol := 'http' ;
   delete ( input , 1 , length ( protocol ) ) ;
   domain := copy ( input , 1 , ( pos ( 'ru' , input ) - 1 ) ) ;
   delete ( input , 1 , length ( domain ) ) ;
   context := copy ( input , ( pos ( 'ru' , input ) + 2 ) , length ( input ) ) ;
   delete ( input , 1 , ( pos ( 'ru' , input ) + 1 ) ) ;
   writeln ( protocol , '://' , domain , '.ru/' , context ) ;
   readln
end.

var a,a_1:string;
    b,i:word;
begin
readln(a);
a_1:='';
if (a[1]+a[2]+a[3])='ftp' then a_1:='ftp://' else a_1:='http://';
b:=pos('ru',a);
if a_1='ftp://' then begin
 for i:=4 to (b-1) do a_1:=a_1+a[i]; end
else begin
 for i:=5 to (b-1) do a_1:=a_1+a[i]; end;
a_1:=a_1+'.ru';
if (b+1)<length(a) then begin
 a_1:=a_1+'/';
 for i:=b+2 to length(a) do a_1:=a_1+a[i]; end;
writeln(a_1);
end.

Var s,q:string;
    i:longint;
  begin
  readLn(s);
  if s[1]='f' then
    begin
    q:=Copy(s,4,length(s)-3);
    Delete(s,4,Length(s)-3);
    s:=s+'://';
    s:=s+q;
    i:=7;
    end else
    begin
    q:=Copy(s,5,length(s)-4);
    Delete(s,5,Length(s)-4);
    s:=s+'://';
    s:=s+q;
    i:=6;
    end;
  while i<=Length(s) do
   begin
   if (s[i]='r') and(s[i+1]='u') then
   begin
   q:=Copy(s,i+2,Length(s)-i+2);
   Delete(s,i,Length(s)-i+1);
   if s[i-1]='/' then
   begin
   if length(q)=0 then s:=s+'ru'else
   begin
   s:=s+'ru/';
   s:=s+q;
   end;
   end else
   if length(q)=0 then s:=s+'.ru'else
   begin
   s:=s+'.ru/';
   s:=s+q;
   end;
   Break
   end else
   i:=i+1;
   end;
   writeln(s);
  end.

const
  fi='';
  fo='';
var
  s,res:string;
  v:longint;
procedure process;
begin
  read(s);
  if s[1]='h' then
  begin
    res:='http://';
    res:=res+copy(s,5,pos('ru',s)-5);
    res:=res+'.ru/';
    res:=res+copy(s,pos('ru',s)+2,length(s));
  end
  else
  begin
    res:='ftp://';
    res:=res+copy(s,4,pos('ru',s)-4);
    res:=res+'.ru/';
    res:=res+copy(s,pos('ru',s)+2,length(s));
  end;
  write(res);
end;

begin
  assign(input,fi); reset(input);
  assign(output,fo); rewrite(output);
  process;
end.

var
 i,j,n,m,k:longint;
 s:string;
begin
 readln(s);
 if s[1]='h' then
                begin
                 write('http://');
                 delete(s,1,4);
                end
  else
   begin
    if s[1]='f' then
                  begin
                   write('ftp://');
                   delete(s,1,3);
                  end;
   end;
  m:=pos('ru',s);
  write(copy(s,1,m-1),'.','ru');
  delete(s,1,m+1);
  if s<>'' then writeln('/',s)
  else writeln;
end.

program adress;
const
 p_http='http';
 c_http=4;
 p_ftp='ftp';
 c_ftp=3;
 p_ru='ru';
 c_ru=2;
 p_br='://';
 p_sl='/';

var
 i:integer;
 s:string[100];

 function rep (sub,t:string; c:integer): string;
 var j:integer;
 begin
  i:=pos(sub,t);
  insert(p_br,t,i+c);
  i:=pos(p_ru,t);
  if t[i-1]<>p_sl then
   begin
    insert('.',t,i);
    insert(p_sl,t,i+c_ru+1);
   end
  else
   begin
   delete(t,i,2);
   insert('!',t,i);
   j:=pos(p_ru,t);
   insert('.',t,j);
   insert(p_sl,t,j+c_ru+1);
   delete(t,i,1);
   insert('ru',t,i)
   end;
      rep:=t;
  end;

begin
readln(s);
case s[1] of
'f': writeln( rep(p_ftp,s,c_ftp));
'h': writeln( rep(p_http,s,c_http));
end;
end.

var a:string[50];
begin
    readln(a);
    if a[1]='f' then begin
        write('ftp://');
        delete(a,1,3);
    end
    else begin
        write('http://');
        delete(a,1,4);
    end;
    write(copy(a,1,pos('ru',a)-1),'.ru/');
    delete(a,1,pos('ru',a)+1);
    writeln(a);
    readln;
end.

program z;
var protokol,protokoll,a,ru,c,s,f:string; i,k,po:byte;
begin
read (a);
i:=length (a);
protokol:='http';
protokoll:='ftp';
ru:='ru';
c:='.';
f:='/';
k:=pos (ru,a);
if pos(protokol,a)<>0 then po:=5
else po:=3;
s:='://';
insert (s,a,po);
insert (c,a,k+po-2);
if k+1=i then write (a)
else begin insert (f,a,k+po+1); write (a);
end;readln;
end.

{$APPTYPE CONSOLE}
{$R+}
{$O-}

uses
  SysUtils, Math;

var
  st: array[1..500] of integer;
  s: string;
  i, mx, r: integer;

procedure push;
begin
  inc(r);
  if r > mx then
    mx := r;
  st[r] := 1;
end;

procedure pop;
begin
  if r <= 0 then
    inc(mx)
  else
    dec(r);
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(s);
  r := 0; mx := 0;
  for i := 1 to length(s) do
    if s[i] = '+' then
      push
    else
      pop;
  write(mx);
end.

const
    finp='';
    fout='';
var s, res: string;
procedure Nhap;
var fi: text;
begin
    assign(fi, finp); reset(fi);
    readln(fi, s);
    close(fi);
end;
procedure Xuat;
var fo: text;
begin
    assign(fo, fout); rewrite(fo);
    writeln(fo, res);
    close(fo);
end;
procedure reg1(var res: string);
begin
    if res[1]='h' then Insert('://', res, 5)
    else insert('://',res, 4);
end;
procedure reg2(var res: string);
var i, j: integer;
begin
    i:=pos('ru', res);
    if (i<=8) then
    for j:=i+1 to length(res) do if (res[j]='r') and (res[j+1]='u') then break;
    i:=j;
    insert('.',res,i);
    if i+2<length(res) then
    insert('/',res,  i+3);
end;
procedure xuli;
begin
    res:=s;
    reg1(res);
    reg2(res);
end;
BEGIN
    Nhap;
    Xuli;
    Xuat;
END.

var
 S:String;
begin
 Read(S);
 if S[1]='h' then begin
                  Write('http://');
                  Delete(S,1,4);
                  end else begin
                           Write('ftp://');
                           Delete(S,1,3);
                           end;
 While S[1]+S[2]<>'ru' do begin
                     Write(S[1]);
                     Delete(S,1,1);
                    end;
 Write('.ru');
 Delete(S,1,2);
if S<>'' then begin
               Write('/',S);
              end;
end.

var s:string;
    d:longint;
begin
   readln(s);
   if s[1]='h' then
     begin
        write('http://');
        delete(s,1,4);
     end
   else
     begin
        write('ftp://');
        delete(s,1,3);
     end;
   d:=pos('ru',s);
   write(copy(s,1,d-1),'.');
   delete(s,1,d+1);
   write('ru');
   if length(s)<>0 then
     writeln('/',s);
end.

var s:string;
    d:longint;
begin
   readln(s);
   if s[1]='h' then
     begin
        write('http://');
        delete(s,1,4);
     end
   else
     begin
        write('ftp://');
        delete(s,1,3);
     end;
   d:=pos('ru',s);
   write(copy(s,1,d-1),'.');
   delete(s,1,d+1);
   write('ru/');
   writeln(s);
end.

var
 i,j,n,m,k:longint;
 s:string;
begin
 readln(s);
 if s[1]='h' then
                begin
                 write('http://');
                 delete(s,1,4);
                end
  else
   begin
    if s[1]='f' then
                  begin
                   write('ftp://');
                   delete(s,1,3);
                  end;
   end;
  m:=pos('ru',s);
  if m=1 then
         begin
          write('ru');
          delete(s,1,2);
          m:=1;
         end;
  write(copy(s,1,m-1),'.','ru');
  delete(s,1,m+1);
  if s<>'' then writeln('/',s)
  else writeln;
end.

{$apptype console}
{$I+,R+,Q+}
Uses
  SysUtils;

Var
  s1,s2:string;
Begin
  readln(s1);
  if s1[1]='h' then begin
    s2:='http://';
    delete(s1,1,4);
  end;
  if s1[1]='f' then begin
    s2:='ftp://';
    delete(s1,1,3);
  end;
  s2:=s2+copy(s1,1,pos('ru',s1)-1);
  delete(s1,1,pos('ru',s1)+1);
  s2:=s2+'.ru';
  if s1<>'' then s2:=s2+'/'+s1;
  writeln(s2);
End.

  var s:string;
      i,l:integer;
begin
  readln(s);
//  l:=length(s);
  if s[1]='h'
    then begin write(s[1],s[2],s[3],s[4],'://'); delete(s,1,4); end
    else begin write(s[1],s[2],s[3],'://'); delete(s,1,3); end;
  i:=1;
  while not((s[i]='r')and(s[i+1]='u')) do
  begin
   write(s[i]);
   inc(i);
  end;
  write('.');
  write(s[i],s[i+1]);
  l:=length(s);
  if i+2<=l
    then begin
         write('/');
         for i:=i+2 to l do
           write(s[i]);
         end;
  writeln;
end.

program z;
var protokol,protokoll,a,ru,c,v,s,f:string; i,k,po:byte;
begin
read (a);
i:=length (a);
protokol:='http';
protokoll:='ftp';
ru:='ru';
c:='.';
f:='/';
v:=copy(a,1,4);
k:=pos (ru,a);
if v=protokol  then po:=5
else po:=4;
s:='://';
insert (s,a,po);
insert (c,a,k+3);
if k+1=i then write (a)
else begin insert (f,a,k+6); write (a);
end;
end.

var s:string;
begin
 readln(s);
 if s[1]='h' then insert('://',s,5) else insert('://',s,4);
 insert('.',s,pos('ru',s));
 insert('/',s,pos('ru',s)+2);if s[length(s)]='/' then delete(s,length(s),1);
 writeln(s);
end.

var  s:string;
        t,t1:integer;
begin
readln(s);
t:=pos('http',s);
if t=0 then t:=100;
t1:=pos('ftp',s);
if t1=0 then t1:=100;
if t<t1 then insert('://',s,5) else insert('://',s,4);
t:=pos('ru',s);
if s[t-1]<>'/' then begin insert('.',s,t);insert('/',s,t+3); end else begin
delete(s,t,2);
insert('.',s,pos('ru',s));
insert('ru',s,t);
insert('/',s,pos('.ru',s)+4);  end;

if s[length(s)]='/' then delete(s,length(s),1);
write(s);
end.

var
  s:string;
  f,i:longint;
  u:boolean;

begin
  readln(s);
  if s[1]='h'
    then
      begin
        write('http://');
        f:=5
      end
    else
      begin
        write('ftp://');
        f:=4
      end;
  u:=false;
  for i:=f to length(s) do
    begin
      if (s[i]='r')and(s[i+1]='u')and(not u)
        then continue;
      if (s[i-1]='r')and(s[i]='u')and(not u)and(i<>f)
        then
          begin
            write('.ru');
            if i<>length(s) then
              begin
                write('/');
                u:=true
              end
          end
        else write(s[i])
    end
end.

var  s:string;
        k,k1:integer;
begin
readln(s);
k:=pos('http',s);
if k=0 then k:=10000;
k1:=pos('ftp',s);
if k1=0 then k1:=10000;
if k<k1 then insert('://',s,5) else insert('://',s,4);
k:=pos('ru',s);
if s[k-1]<>'/' then begin insert('.',s,k);insert('/',s,k+3); end else begin
delete(s,k,2);
insert('.',s,pos('ru',s));
insert('ru',s,k);
insert('/',s,pos('.ru',s)+4);  end;

if s[length(s)]='/' then delete(s,length(s),1);
write(s);
readln;
end.

var
 i,y,x,d:longint;
 s:ansistring;
begin
 readln(s);
 if s[1]='f' then begin
                   write('ftp://');
                   d:=4;
                  end
 else begin
       write('http://');
       d:=5;
      end;
 x:=pos('p',S);
 y:=pos('ru',s);
 if y=d then begin
              write('ru');
              delete(s,y,2);
              y:=pos('ru',s);
              for i:=x+1 to y-1 do
               begin
                write(s[i]);
               end;
             end;
 for i:=x+1 to y-1 do
  begin
   write(s[i]);
  end;
 write('.ru');
 if y+1<length(s) then begin
                        write('/');
                        for i:=y+2 to length(s) do
                         begin
                          write(s[i]);
                         end;
                       end;
end.

var i,next:longint;
    s:string;

begin

  readln(s);

  if pos('http',s)=1 then
    begin
      write('http://');
      next:=5;
    end
  else
    begin
      write('ftp://');
      next:=4;
    end;

  for i:=next to pos('ru',s)-1 do
    write(s[i]);

  write('.ru/');
  for i:=pos('ru',s)+2 to length(s) do
    write(s[i]);

end.

program KROKz1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var n,t,x,y,i,a,b,j:longint;
    s:string;  f:boolean;
begin
{ assign(input,'input.txt');reset(input);
 assign(output,'output.txt');rewrite(output);}
 read(s);
 if s[1]='h' then begin write('http'); delete(s,1,4); end else
 if s[1]='f' then begin write('ftp'); delete(s,1,3);end;
 write('://');   f:=false;
 for i:=1 to length(s)-2 do
  begin
   if (f)and(s[i]='r')and(s[i+1]='u') then
   begin write('.ru');
   if i<>length(s)-1 then
    begin
      write('/');
      for j:=i+2 to length(s) do write(s[j]);
      exit;
    end;
   end else begin f:=true; write(s[i]); end;
  end;
end.

var x,y,m,n,k,i,j,p,t:longint;
s,s1,s2:string;
begin
readln(s);
if s[1]='f' then
              begin
               s1:='ftp://';
               delete(s,1,3);
              end else
              begin
               s1:='http://';
               delete(s,1,4);
              end;
 k:=pos('ru',s);
 s1:=s1+copy(s,1,k-1)+'.ru';
 delete(s,1,k+1);
 if s>'' then s1:=s1+'/'+s;
 writeln(s1);

              end.

var
  s:string;
  f,i:longint;
  u:boolean;

begin
  readln(s);
  if s[1]='h'
    then
      begin
        write('http://');
        f:=5
      end
    else
      begin
        write('ftp://');
        f:=4
      end;
  u:=false;
  for i:=f to length(s) do
    begin
      if (s[i]='r')and(s[i+1]='u')and(not u)
        then continue;
      if (s[i-1]='r')and(s[i]='u')and(not u)and(i<>(f-1))
        then
          begin
            write('.ru');
            if i<>length(s) then
              begin
                write('/');
                u:=true
              end
          end
        else write(s[i])
    end
end.

var
  s:string;
  f,i:longint;
  u:boolean;

begin
  readln(s);
  if s[1]='h'
    then
      begin
        write('http://');
        f:=5
      end
    else
      begin
        write('ftp://');
        f:=4
      end;
  u:=false;
  for i:=f to length(s) do
    begin
      if (s[i]='r')and(s[i+1]='u')and(not u)
        then continue;
      if (s[i-1]='r')and(s[i]='u')and(not u)
        then
          begin
            write('.ru');
            if i<>length(s) then
              begin
                write('/');
                u:=true
              end
          end
        else write(s[i])
    end
end.

var
        s:string;
        a,i,f:integer;
begin
        readln(s);
        if (s[1]='h') then
                write('http://')
        else
        begin
                write('ftp://');
                a:=1;
        end;
        for i:=5-a to length(s) do
        begin
                if (a=2) then
                begin
                        a:=1;
                        continue;
                end;
                if ((f=0) and (concat(s[i],s[i+1])='ru') and (i+1<>length(s))) then
                begin
                        write('.ru');
                        f:=1;
                        if (i+1<>length(s)) then
                                write('/');
                        a:=2;
                end
                else
                        write(s[i]);
        end;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i : integer;
  s, s1 : string;
  bool : boolean;

begin
//  reset(input, 'input.txt');
//  rewrite(output, 'output.txt');

  readln(s);
  s1 := '';
  i := 1;
  bool := false;
  while i <= length(s) do begin
    s1 := s1 + s[i];
    if (s1 = 'http') or (s1 = 'ftp') then
      s1 := s1 + '://';
    if (s[i] = 'r') and (s[i + 1] = 'u') and (not bool) then begin
      s1 := s1 + '.ru';
      inc(i, 1);
      if (length(s) > i) then begin
        s1 := s1 + '/';
        bool := true;
      end;
    end;
    inc(i);
  end;

  writeln(s1);

end.

const fin='';
     fout='';
var st,s1:string;
     vt,l,i,j:integer;
     f,g:text;
begin
     assign(f,fin);
     reset(f);
     assign(g,fout);rewrite(g);
     readln(f,st);
     vt:=pos('http',st);
     if vt=1 then
          begin
          s1:=s1+'http://';
          l:=5;
          end;
     vt:=pos('ftp',st);
     if vt=1 then
          begin
          s1:=s1+'ftp://';
          l:=4;
          end;
     for i:=l+1 to length(st)-1 do
          if (st[i]='r') and (st[i+1]='u') then
               begin
                    for j:=l to i-1 do s1:=s1+st[j];
                    s1:=s1+'.ru';
                    if (i+2>length(st)) then break
                    else
                         begin
                         s1:=s1+'/';
                         for j:=i+2 to length(st) do s1:=s1+st[j];
                         break;
                         end;
               end;
     write(g,s1);
end.

Var s:string;
    i,j,n:longint;
 begin
  Readln(s);
  if (s[1]='f') and (s[2]='t') and (s[3]='p') then
   begin
    n:=4;
    Write('ftp://')
   end
  else
  if (s[1]='h') and (s[2]='t') and (s[3]='t') and (s[4]='p') then
   begin
    n:=5;
    Write('http://');
   end;
  if (s[length(s)]='u') and (s[length(s)-1]='r') then
   begin
    for i:=n to length(s)-2 do
     Write(s[i]);
    Write('.ru');
    Halt(0);
   end;
  j:=n;
  While j<=length(s)-1 do
   begin
    if (s[j]='r') and (s[j+1]='u') then
     begin
      for i:=n to j-1 do
       Write(s[i]);
      Write('.ru');
      n:=j+2;
      if n<=length(s) then begin
       Write('/');
       for i:=n to length(s) do
        begin
         Write(s[i]);
         if i=length(s) then halt(0);
        end;
       end;
     end;
    inc(j);
   end;
  end.

const
    finp='';
    fout='';
var s, res: string;
procedure Nhap;
var fi: text;
begin
    assign(fi, finp); reset(fi);
    readln(fi, s);
    close(fi);
end;
procedure Xuat;
var fo: text;
begin
    assign(fo, fout); rewrite(fo);
    writeln(fo, res);
    close(fo);
end;
procedure reg1(var res: string);
begin
    if res[1]='h' then Insert('://', res, 5)
    else insert('://',res, 4);
end;
procedure reg2(var res: string);
var i: integer;
begin
    i:=pos('ru', res);
    insert('.',res,i);
    if i+2<length(res) then
    insert('/',res,  i+3);
end;
procedure xuli;
begin
    res:=s;
    reg1(res);
    reg2(res);
end;
BEGIN
    Nhap;
    Xuli;
    Xuat;
END.

var
 s,s1,s2,ss:string;
 i,j:longint;
begin
 readln(s);
 s1:='http';
 s2:='ftp';
 if pos(s1,s)=1 then begin ss:=s1+'://'; delete(s,1,4); end;
 if pos(s2,s)=1 then begin ss:=s2+'://'; delete(s,1,3); end;
 i:=pos('ru',s);
 if i=1 then begin ss:=ss+'ru'; delete(s,1,2); end;
 j:=pos('p',s)+1;
 s1:=copy(s,j,i-j);
 ss:=ss+s1+'.ru';
 if i+2<=length(s) then ss:=ss+'/'+copy(s,i+2,length(s)-i-1);
 writeln(ss);
end.

var s,k4,k5:string;
k1,k2,i,k3,d:longint;
begin
k1:=0;k2:=0;
readlN(S);
k1:=pos('http',s);
k2:=pos('ftp',s);
if k1=0 then  begin write('ftp://');d:=3;end  else
if k2=0 then  begin write('http://');d:=4;end  else
if k1<k2 then begin write('http://');d:=4;end else
if k1>k2 then begin write('ftp://');d:=3;end;
k3:=pos('ru',s);
k4:=copy(s,d+1,k3-d-1);
k5:=copy(s,k3,2);
delete(s,1,k3+1);

write(k4);write('.',k5,'.');
 write(S);
end.

var l,s:string; j,i:integer;
begin
read(s);
repeat
inc(i);
l:=l+s[i];
until (l='http')or(l='ftp');
l:=l+'://';inc(i);
repeat;
l:=l+s[i];
inc(i);
until (s[i]='r')and(s[i+1]='u');
l:=l+'.ru';
i:=i+2;
if s[i]<>'' then begin l:=l+'/';for j:=i to length(s) do l:=l+s[j];end;
write(l);
end.

type    mang=array[1..100000] of longint;
var     s,s1:string;vt,vt1,i:longint;
begin
        readln(s);
        vt1:=pos('ru',s);
        if s[1]='h' then
        begin
                write('http://');
                vt:=5;
        end
        else
        begin
                write('ftp://');
                vt:=4;
        end;
        for i:= vt to vt1-1 do write(s[i]);
        write('.ru');;
        if length(s)-vt1-1<>0 then
        begin
                write('/');
                for i:=vt1+2 to length(s) do write(s[i]);
        end;
        readln;
end.

Var s:string;

Begin

  readln(s);

  if pos('http',s)=1 then
                      insert('://',s,5) else

  if pos('ftp',s)=1 then
                     insert('://',s,4);

  if pos('ru',s)>9 then
                    begin
                     insert('.',s,pos('ru',s));
                     insert('/',s,pos('ru',s)+2);
                    end;

  writeln(s);

End.

{$r-, s-, q-, i-, o+}
var
  s : ansistring;
  i, len : longint;
begin
  readln(s);
  if (s[1] = 'h') then len := 4 else len := 3;
  s := copy(s, 1, len) + '://' + copy(s, len + 1, length(s) - len);
  i := pos('ru', s);
  s := copy(s, 1, i - 1) + '.' + copy(s, i, length(s) - i + 1);
  if (i + 1 < length(s)) then s := copy(s, 1, i + 2) + '/' + copy(s, i + 3, length(s) - i - 1);
  writeln(s);
end.

Var s : string;
i, k, l : integer;
a : array [1..100] of char;
b : array [1..100] of char;
m : boolean;
Begin
Readln (s);
for i:=1 to length (s) do
    begin
    a[i]:=s[i];
    end;
k:=length (s);
if a[1]='f' then
   begin
   b[1]:='f';
   b[2]:='t';
   b[3]:='p';
   b[4]:=':';
   b[5]:='/';
   b[6]:='/';
   for i:=7 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+3;
   end;
If a[1]='h' then
   begin
   b[1]:='h';
   b[2]:='t';
   b[3]:='t';
   b[4]:='p';
   b[5]:=':';
   b[6]:='/';
   b[7]:='/';
   for i:=8 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+4;
   end;
i:=8;
m:=(b[i]='r') and (b[i]='u');
if b[1]='h' then inc (i);
While m=false do
      begin
      m:=(b[i]='r') and (b[i+1]='u');
      inc(i);
      end;
i:=i-1;
For l:=k+1 downto i do
    begin
    b[l]:=b[l-1];
    end;
b[i]:='.';
inc(k);
inc(i);
if b[1]='h' then inc (i);
If i+1<>k then
   begin
   if b[1]='h' then i:=i-1;
   for l:=k+1 downto i+2 do
       begin
       b[l]:=b[l-1];
       end;
   b[i+2]:='/';
   inc (k);
   end;
For i:=1 to k-1 do
    begin
    write (b[i]);
    end;
End.

var
a:string;
i,j,g:longint;
begin
readln(a);
if(a[1]='h') then
begin
i:=5;
write('http://');
end
else
begin
write('ftp://');
i:=4;
end;
g:=8;
while(g=8) do
begin
write(a[i]);
i:=i+1;
if(a[i]='r') and (a[i+1]='u') then g:=7;
end;
write('.ru/');
i:=i+2;
for j:=i to length(a) do write(a[j]);
writeln;
end.

const
  fi='';
  fo='';
var
  s,res:string;
  i:longint;
procedure process;
begin
  read(s);
  if s[1]='h' then
  begin
    res:='http://';
    for i:=length(s) downto 2 do
      if s[i-1]+s[i]='ru' then
      begin
        res:=res+copy(s,5,i-1);
        break;
      end;
    res:=res+'.ru/';
    res:=res+copy(s,i+2,length(s));
  end
  else
  begin
    res:='ftp://';
//    res:=res+copy(s,4,pos('ru',s)-4);
    for i:=length(s) downto 2 do
      if s[i-1]+s[i]='ru' then
      begin
        res:=res+copy(s,4,i-1);
        break;
      end;
    res:=res+'.ru/';
    res:=res+copy(s,pos('ru',s)+2,length(s));
  end;
  write(res);
end;

begin
  assign(input,fi); reset(input);
  assign(output,fo); rewrite(output);
  process;
end.

var S : string[50];
begin
     readln(S);
     If pos('http',S) = 1 then insert('://',S,5)
     else insert('://',S,4);
     insert('.',S,pos('ru',S));
     If pos('ru',S) <> length(S) - 1 then
        insert('/',S,pos('ru',S)+2);
     writeln(S);
end.

program adress;
const
 p_http='http';
 c_http=4;
 p_ftp='ftp';
 c_ftp=3;
 p_ru='ru';
 c_ru=2;
 p_br='://';
 p_sl='/';

var
 i:integer;
 s:string[100];

 function rep (sub,t:string; c:integer): string;
 var j:integer;
 begin
  i:=pos(sub,t);
  insert(p_br,t,i+c);
  i:=pos(p_ru,t);
  if t[i-1]<>p_sl then
   begin
    insert('.',t,i);
    if t[i+c_ru+1]<>'%' then
    insert(p_sl,t,i+c_ru+1);
   end
  else
   begin
   delete(t,i,2);
   insert('!',t,i);
   j:=pos(p_ru,t);
   insert('.',t,j);
   if t[i+c_ru+1]<>'%' then
   insert(p_sl,t,j+c_ru+1);
   delete(t,i,1);
   insert('ru',t,i)
   end;
      i:=length(t);
      delete(t,i,1);
      rep:=t;
  end;

begin
readln(s);
i:=length(s);
insert('%',s,i+1);
writeln(s);
readln;
i:=0;
case s[1] of
'f': writeln( rep(p_ftp,s,c_ftp));
'h': writeln( rep(p_http,s,c_http));
end;
end.

var
    s:string;
    d,i:longint;
begin
readln(s);
if (s[1]='h') and (s[2]='t') and (s[3]='t') and (s[4]='p') then begin write(s[1],s[2],s[3],s[4],'://'); d:=5; end;
if (s[1]='f') and (s[2]='t') and (s[3]='p') then begin write(s[1],s[2],s[3],'://'); d:=4; end;
while (s[d]<>'r') or (s[d+1]<>'u') do
begin
    write(s[d]);
    d:=d+1;
end;
write('.ru'); d:=d+2;
if d<=length(s) then
begin
    write('/');
    for i:=d to length(s) do
        write(s[i]);
end;
end.

Var s : string;
i, k, l : integer;
a : array [1..100] of char;
b : array [1..100] of char;
m : boolean;
Begin
Readln (s);
for i:=1 to length (s) do
    begin
    a[i]:=s[i];
    end;
k:=length (s);
if a[1]='f' then
   begin
   b[1]:='f';
   b[2]:='t';
   b[3]:='p';
   b[4]:=':';
   b[5]:='/';
   b[6]:='/';
   for i:=7 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+3;
   end;
If a[1]='h' then
   begin
   b[1]:='h';
   b[2]:='t';
   b[3]:='t';
   b[4]:='p';
   b[5]:=':';
   b[6]:='/';
   b[7]:='/';
   for i:=8 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+4;
   end;
i:=8;
m:=(b[i]='r') and (b[i]='u');
While m=false do
      begin
      inc (i);
      m:=(b[i]='r') and (b[i+1]='u');
      end;
For l:=k+1 downto i do
    begin
    b[l]:=b[l-1];
    end;
b[i]:='.';
inc(k);
inc(i);
If i+2<>k then
   begin
   for l:=k+1 downto i+2 do
       begin
       b[l]:=b[l-1];
       end;
   b[i+2]:='/';
   inc (k);
   end;
For i:=1 to k do
    begin
    write (b[i]);
    end;
End.

var
  s,s1,s2,l,f : string;
  p,i,p1 : longint;
begin
  readln(s);
  p:=1;
  f:='';
  if s[p]='h' then begin f:=f+'http://'; p:=5; end
                else begin f:=f+'ftp://'; p:=4; end;
  s1:=copy(s,p,length(s));
  for i:=1 to length(s1) do
    if (s1[i]='r') and (s1[i+1]='u') then begin p1:=i; l:=copy(s1,1,p1-1); f:=f+l; f:=f+'.ru'; break; end;
  s2:=copy(s1,p1+2,length(s1));
  if s2=''
    then writeln(f)
    else writeln(f,'/',s2);
end.

var
  s:string;
  f,i:longint;
  u:boolean;

begin
  readln(s);
  if s[1]='h'
    then
      begin
        write('http://');
        f:=5
      end
    else
      begin
        write('ftp://');
        f:=4
      end;
  u:=false;
  for i:=f to length(s) do
    begin
      if (s[i]='r')and(s[i+1]='u')and(not u)
        then continue;
      if (s[i-1]='r')and(s[i]='u')and(not u)and(i<>f)
        then
          begin
            write('.ru');
            if i<>length(s) then
              begin
                write('/');
                u:=true
              end
          end
        else write(s[i])
    end
end.

var i, n, ans: LongInt;
s, st, x: String;
begin
  Readln(s);
  if (pos('http',s)=1) then
  begin
    st:='http://';
    Delete(s,1,4);
    s:=st+s;
  end else
  begin
    st:='ftp://';
    Delete(s,1,3);
    s:=st+s;
  end;

    if length(s)-7=3 then
    begin
      x:=Copy(s,length(s)-1,2);
      Delete(s,length(s)-1,2);
      s:=s+'.'+x;
    end else
    if length(s)-7=2 then
    begin
      x:=Copy(s,length(s),1);
      Delete(s,length(s),1);
      s:=s+'.'+x;
    end else
    begin
      x:=Copy(s,length(s)-3,4);
      Delete(s,length(s)-3,4);
      s:=s+'.'+x[1]+x[2]+'/'+x[3]+x[4];
    end;
    Writeln(s);
end.

var s,s1,s2,s3:string;
    i,j:longint;
begin
//  assign(input,'input.txt'); reset(input);
//    assign(output,'output.txt'); rewrite(output);
  readln(s);
  if pos('h',s)=1
    then
      begin
        write('http://');
        delete(s,1,4);
      end;
  if pos('f',s)=1
    then
      begin
        write('ftp://');
        delete(s,1,3);
      end;
  if pos('ru',s)=1
    then
      begin
        write('r');
        delete(s,1,1);
      end;
  for i:=1 to pos('ru',s)-1 do
    write(s[i]);
  delete(s,1,pos('ru',s)-1);
  write('.ru');
  if length(s)=0 then exit
    else
      begin
        write('/',s);
        exit;
      end;
end.

Procedure FTP();
Begin
     write('ftp');
     write('://');
End;
Procedure HTTP();
Begin
     write('http');
     write('://');
End;

Var s:string;
    a,b,k,i,j,n:integer;
Begin
readln(s);
a:=pos('http',s);
b:=pos('ftp',s);
if ((a>b) and (a<>0) and (b<>0)) or (a=0) then
   Begin
     FTP();
     k:=4;
   End;
if ((a<b) and (a<>0) and (b<>0)) or (b=0) then
   Begin
     HTTP();
     k:=5;
   End;
for i:=k+1 to length(s)-1 do
  if (s[i]='r') and (s[i+1]='u') then
    Begin
     for j:=k to i-1 do
       write(s[j]);
     break;
    End;
write('.ru/');
for n:=i+2 to length(s) do
  write(s[n]);
End.

var s,nov: string;
    i,j: byte;
begin
  readln(s); i:=1;
  if s[1]='h' then begin nov:=nov+'http://'; inc(i,4); end
  else if s[1]='f' then begin nov:=nov+'ftp://'; inc(i,3); end;
  if pos('ru',s)=i then begin nov:=nov+'ru'; inc(i,2); end;
    while (copy(s,i,2)<>'ru') do
      begin
      nov:=nov+s[i];
      inc(i);
      end;
  nov:=nov+'.ru';
  inc(i,2);
  if i<length(s) then
  nov:=nov+'/';
  for j:=i to length(s) do
    nov:=nov+s[j];
  writeln(nov);
end.

var
s:string;
i,j,l:Longint;
begin
read(s);
for i:=length(s) downto 1 do
 begin
 if s[i]='p' then j:=i;
 if (s[i]='u') and (s[i-1]='r') and ((i-1)<>3) and ((i-1)<>4)then l:=i;
 end;
 for i:=1 to length(s) do
 begin
 if l-1=i then write('.');
 write(s[i]);
 if j=i then write('://');
 if (l=i) and(i<length(s)) then write('/');
 end;
 end.

var
 s,h,m,l:string;
 i,j,k:integer;
begin
 readln (s);
 if s[1]='h' then
 begin
  h:='http://';
  k:=5;
 end
             else
 begin
  h:='ftp://';
  k:=4;
 end;
 for i:=k+1 to length (s) do
 begin
  if (s[i]='r') and (s[i+1]='u') then
  begin
   for j:=k to i-1 do
    m:=m+s[j];
   k:=i+1;
   break;
  end;
 end;
 m:=m+'.ru/';
 for i:=k+1 to length (s) do
  l:=l+s[i];
 write (h,m,l);
end.

var
a:string;
i,j,g:longint;
begin
readln(a);
if(a[1]='h') then
begin
i:=5;
write('http://');
end
else
begin
write('ftp://');
i:=4;
end;
g:=8;
while(g=8) do
begin
write(a[i]);
i:=i+1;
if(a[i]='r') and (a[i+1]='u') then g:=7;
end;
write('.ru');
i:=i+2;
for j:=i to length(a) do write(a[j]);
writeln;
end.

var s,s1,s2:string; i:byte;
begin
    readln(s);
    s1:=copy(s,1,3); s2:='';
    if (s1='ftp') then else s1:=copy(s,1,4);
    delete(s,1,length(s1));
    if (pos('ru',s)>1) then else
    begin
        s2:='ru'; delete(s,1,2);
    end;
    s2:=s2+copy(s,1,pos('ru',s)-1);
    delete(s,1,pos('ru',s)+1);
    writeln(s1,'://',s2,'.ru/',s);
end.

var
	a, i, j : longint;
	s : string;
begin
//	reset(input, 'a.in');rewrite(output, 'a.out');
	read(s);
	if (s[1] = 'f') then a := 3
	else a := 4;
	i := a+1;
	while (i < length(s)) and (s[i]+s[i+1] <> 'ru') do inc(i);
	for j := 1 to a do write(s[j]);
	write('://');
	for j := a+1 to i-1 do write(s[j]);
	write('.ru');
	if (i+1 < length(s)) then write('/');
	for j := i+2 to length(s) do write(s[j]);
end.

var s,s1,s2,ss:string;
a,b,c,i,j,k,n,m:longint;
begin
readln(s);
if s[1]='h' then begin
ss:=copy(s,1,4);
ss:=ss+':'+'//';
i:=5;
while (s[i]<>'r') or (s[i+1] <>'u') do begin
 ss:=ss+s[i];
 inc(i);
end;
i:=i+2;
ss:=ss+'.ru';
if (i<>length(s)-2) and (i<=length(S)) then
begin
ss:=ss+'/';

while i<=length(S) do begin ss:=ss+s[i]; inc(I); end;
end;
end
else
begin
ss:=copy(s,1,3);
ss:=ss+':'+'//';
 i:=4;
while (s[i]<>'r') and (s[i+1] <>'u') do begin
 ss:=ss+s[i];
 inc(i);
end;
i:=i+2;
ss:=ss+'.ru';
if (i<>length(s)-2) and (i<=length(S)) then
begin
ss:=ss+'/';

while i<=length(S) do begin ss:=ss+s[i]; inc(I); end;
end;
end;

writeln(SS);
end.

var s:string;
i:integer;
begin
readln(s);
if s[1]='h' then insert('://',s,5);
if s[1]='f' then insert('://',s,4);
for i:=8 to length(s) do
if (s[i+1]='r')and(s[i+2]='u') then begin insert('.',s,i+1);insert('/',s,i+4);break;end;
writeln(s);
end.

var s,k4,k5,sn:string;
k1,k2,i,k3,d:longint;
begin
k1:=0;k2:=0;sn:='';
readlN(S);
k1:=pos('http',s);
k2:=pos('ftp',s);
if k1=0 then  begin write('ftp://');d:=3;end  else
if k2=0 then  begin write('http://');d:=4;end  else
if k1<k2 then begin write('http://');d:=4;end else
if k1>k2 then begin write('ftp://');d:=3;end;
k3:=pos('ru',s);
k4:=copy(s,d+1,k3-d-1);
k5:=copy(s,k3,2);
delete(s,1,k3+1);

write(k4);write('.',k5,'/');
 write(S);
end.

var s:string;
    d:longint;
begin
   readln(s);
   if s[1]='h' then
     begin
        write('http://');
        delete(s,1,4);
     end
   else
     begin
        write('ftp://');
        delete(s,1,3);
     end;
   d:=pos('ru',s);
   write(copy(s,1,d-1),'.');
   delete(s,1,d+1);
   write('ru');
   if length(s)<>0 then
     writeln('/',s);
end.

Var i,k,t:longint;
    s:string;
  Begin
    Readln(s);
    t:=0;
    if s[1]='h' then begin write('http://'); t:=t+1; k:=5; end else write('ftp://');
    if t=1 then
    begin
     for i:=5 to length(s) do
     if (s[i]='r') and (s[i+1]='u' ) then begin write('.ru'); k:=k+2; break; end
     else begin write(s[i]); k:=k+1; end;
     if k<=length(s) then write('/');
      for  i:=k to length(s) do
      write(s[i]);
     exit;
    end;
     if t=0 then
     begin
     k:=4;
     for i:=4 to length(s) do
     if (s[i]='r') and (s[i+1]='u' ) then begin write('.ru'); k:=k+2; break; end
     else begin write(s[i]); k:=k+1; end;  end;
    if k<=length(s) then write('/');
      for  i:=k to length(s) do
      write(s[i]);
     exit;
     end.

var
  s:string;
  p:longint;
begin
  readln(s);
  if s[1]='h'
    then begin
           write('http://');
           delete(s,1,4);
         end
    else begin
           write('ftp://');
           delete(s,1,3);
         end;
  p:=pos('ru',s);
  if p=1
    then begin
           repeat
             inc(p);
           until(s[p]='r')and(s[p+1]='u');
         end;
  writeln(copy(s,1,p-1),'.ru/',copy(s,p+2,length(s)-p-1));
end.

{$Mode objfpc}

var
    s: string;

begin
 //   assign(input, 'text.inp'); reset(input);
    readln(s);
    if s[1]= 'h' then insert('://', s, 5) else insert('://',s, 4);
    insert('.', s, pos('ru', s));
    if pos('ru', s)+ 1 < length(s) then insert('/', s, pos('ru', s)+ 2);
    writeln(s);
end.

var
s:string;
i,j,l:Longint;
begin
read(s);
for i:=length(s) downto 1 do
 begin
 if s[i]='p' then j:=i;
 if (s[i]='u') and (s[i-1]='r') and ((i-1)<>5) and ((i-1)<>4)then l:=i;
 end;
 for i:=1 to length(s) do
 begin
 if l-1=i then write('.');
 write(s[i]);
 if j=i then write('://');
 if (l=i) and(i<length(s)) then write('/');
 end;
 end.

var
     S,S1,S2,Ans:String;
     i:Longint;
begin
     Readln(S);
     if S[1]+S[2]+S[3]='ftp' then begin
                                       Ans:=Ans+'ftp://';
                                       Delete(S,1,3);
                                    end
     else if S[1]+S[2]+S[3]+S[4]='http' then begin
                                                  Ans:=Ans+'http://';
                                                  Delete(S,1,4);
                                              end;
     i:=1;
     while i<=Length(S)-1 do
begin
     if S[i]='r' then begin
                           if S[i+1]='u' then begin
                                                   Ans:=Ans+S2+'.ru/';
                                                   Delete(S,1,i+1);
                                                   Break;
                                               end
                                         else S2:=S2+S[i];
                       end
                 else S2:=S2+S[i];
                 Inc(i);
 end;
     Ans:=Ans+S;
     Writeln(Ans);
 end.

               program pr1;

{$APPTYPE CONSOLE}
{type
 zap=record p1,p2,p3:int64;end; zap1=^zap;
     chislo=record ch,st:int64;end; chislo1=^chislo;
}const nn=1000001; besk=2000000000000;
   nnn=2000000;  eps=1e-14;
 label 1,2,3,4;
var i2,i1,w,h,len,i0,kol,j0,kolzn,k,kk,step,i,j,start,finish,per:longint;
modul,dmin,dmax,tt,s,ii,jj,ot,p,t2,dx1,dy1,t1old,t2old,f,n,mmin,imin,p1,p2,l,m,k1,k2,a2:int64;
sumabad,sumagood,sumbbad,sumbgood:int64;
centr,aa,bb,cc,koef:int64;  ch,ch1,ch2:char;
{ott:zap; ott1:zap1;   }
a,b,t,tkr,neust,cena:array[0..1000000] of int64;
flag2,flag1,flag:boolean;
c1,c2:char;
gr:array[0..200,0..200] of boolean;
st:array[0..10000] of int64;
dwhite,dblack : array[-1000..2000,-1000..2000] of int64;
dd :double;
namemin:string;
ss1,ss2,ss:string;{array[0..1100000] of char;}
name:array[0..2000] of string;
spname: array[0..10000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

  function deg(a,pow:int64):int64; var s,t:int64;
begin
   if pow=0 then deg:=1 else if odd(pow) then deg:=(deg(a,pow-1)*a) mod modul else
    begin  t:=deg(a,pow div 2); deg:=(t*t) mod modul;    end;

end;
   function kolcikl:int64; var s,i,j,k:longint;
begin     s:=0;
     for i:=1 to n do for j:=i+1 to n do for k:=j+1 to n do
     if gr[i,j] and gr[j,k] and gr[k,i] then begin inc(s);      end;
kolcikl:=s;
end;

  function prost(k:longint):boolean;  var i,j,s:longint; t:double; fl:boolean;
begin
  t:=sqrt(k); fl:=true;
   s:=round(t)+1;
   { writeln(s,' ');
   } for i:=2 to s do if k mod i=0 then flag:=false;

end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}        read(ss);
        n:=length(ss);
     if ss[1]='f' then i1:=4 else i1:=5;
    for i:=1 to i1-1 do write(ss[i]); write('://');
    for i:=i1+1 to n-1 do if (ss[i]='r')and(ss[i+1]='u') then i2:=i;
    for i:=i1 to i2-1 do write(ss[i]);write('.'); write('ru'); write('/');
    for i:=i2+2 to n do write(ss[i]);

   1:          close(output);
end.

var i,next,ppos:longint;
    s,ss:string;

begin

  readln(s);

  if pos('http',s)=1 then
    begin
      write('http://');
      next:=5;
    end
  else
    begin
      write('ftp://');
      next:=4;
    end;

  if pos('ru',s)=next then
    begin
      ss:=copy(s,next+2,length(s)+1-next-2);
      ppos:=pos('ru',ss);
      for i:=next to next+ppos do
        write(s[i]);
      write('.ru');
      if next+ppos+1+2<=length(s) then write('/');
      for i:=next+ppos+1+2 to length(s) do
        write(s[i]);
    end
  else begin
    for i:=next to pos('ru',s)-1 do
    write(s[i]);

  write('.ru');
  if pos('ru',s)+2<length(s) then write('/');
  for i:=pos('ru',s)+2 to length(s) do
    write(s[i]);
  end;

end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  stS, s: String[50];
begin
  s := ':/';
  s := s +'/';
  ReadLn(stS);
  if Pos('ftp', stS) = 1 then
    insert(s, stS, 4)
  else
    if pos('ftp', stS) = 1 then
      insert(s, stS, 5);

  insert('.', stS, Pos('ru', stS));
  if stS[Pos('.ru', stS)+3] in ['a'..'z'] then
    insert('/', stS, Pos('.', stS)+3);
  WriteLn(stS);
  ReadLn;
end.

var s,s1,s2,ss:string;
a,b,c,i,j,k,n,m:longint;
begin
readln(s);
if s[1]='h' then begin
ss:=copy(s,1,4);
ss:=ss+':'+'//';
i:=5;
while (s[i]<>'r') or (s[i+1] <>'u') or (i=5) do begin
 ss:=ss+s[i];
 inc(i);
end;
i:=i+2;
ss:=ss+'.ru';
if (i<>length(s)-2) and (i<=length(S)) then
begin
ss:=ss+'/';

while i<=length(S) do begin ss:=ss+s[i]; inc(I); end;
end;
end
else
begin
ss:=copy(s,1,3);
ss:=ss+':'+'//';
 i:=4;
while (s[i]<>'r') and (s[i+1] <>'u')  or (i=4)  do begin
 ss:=ss+s[i];
 inc(i);
end;
i:=i+2;
ss:=ss+'.ru';
if (i<>length(s)-2) and (i<=length(S)) then
begin
ss:=ss+'/';

while i<=length(S) do begin ss:=ss+s[i]; inc(I); end;
end;
end;

writeln(SS);
end.

var
n,i:longint;
s:string;
begin
read(s);
  if (s[1]='f') and (s[2]='t') and (s[3]='p') then insert('://',s,4);
  if (s[1]='h') and (s[2]='t') and (s[3]='t') and (s[4]='p') then insert('://',s,5);

  i:=1;
  while i<=length(s) do begin
    if (s[i]='r') and (s[i+1]='u') then begin insert('.',s,i); insert('/',s,i+3); break; end;
    inc(i);
  end;

  write(s);

end.

var
  t,x,y,sax,say,sbx,sby,n,i,http,ftp,k:longint;
  s1,ans:ansistring;
begin
 // assign(input,'input.txt'); reset(input); assign(output,'output.txt'); rewrite(output);
  readln(s1);
   http:=pos('http',s1);
   ftp:=pos('ftp',s1);
  if http=1 then begin
      ans:=ans+'http://';
      delete(s1,1,4);
      k:=pos('ru',s1);
      if k<>0 then begin
         ans:=ans+copy(s1,1,k-1);
         ans:=ans+'.ru';
         delete(s1,1,k+1);
         if length(s1)<>0 then ans:=ans+'/'+s1;
      end;
  end;
  if ftp=1 then begin
      ans:=ans+'ftp://';
      delete(s1,1,3);
      k:=pos('ru',s1);
      if k<>0 then begin
         ans:=ans+copy(s1,1,k-1);
         ans:=ans+'.ru';
         delete(s1,1,k+1);
         if length(s1)<>0 then ans:=ans+'/'+s1;
      end;
  end;
  writeln(ans);
end.

var i:longint;
    f:boolean;
    s,s1,s2:string;
begin
  readln(s);
  s1:='';
  f:=false;
  if (s[1]='h') then
  begin
    s1:=s1+'http://';
    delete(s,1,4);
  end
  else
  begin
    s1:=s1+'ftp://';
    delete(s,1,3);
  end;
  i:=1;
  while (i<=length(s)) do
  begin
    if (s[i]='r') and (s[i+1]='u') and (not f) then
    begin
      s2:=copy(s,1,i-1);
      s1:=s1+s2+'.ru/';
      s2:=copy(s,i+2,length(s)-i+1);
      s1:=s1+s2;
      break;
    end;
    inc(i);
  end;
  writeln(s1);
end.

var s:string;
i:integer;
begin
readln(s);
if s[1]='h' then insert('://',s,5);
if s[1]='f' then insert('://',s,4);
for i:=7 to length(s) do
if (s[i+1]='r')and(s[i+2]='u') then begin insert('.',s,i+1);insert('/',s,i+4);break;end;
writeln(s);
end.

program Project3;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
s,link:string;
i:integer;
begin
  readln(s);
  if s[1]='f' then
    begin
    link:=Copy(s,1,3) + '://';
    for i:=5 to Length(s) do
    if Copy(s,i,2) = 'ru' then
      begin
        link:=link + copy(s,4,i-4) + '.ru/' + Copy(s,i+2,Length(s)-i-1);
        break;
      end;
      end
  else if s[1]='h' then
    begin
    link:=Copy(s,1,4) + '://';
    for i:=6 to Length(s) do
    if Copy(s,i,2) = 'ru' then
      begin
        link:=link + copy(s,5,i-5) + '.ru/' + Copy(s,i+2,Length(s)-i-1);
        break;
      end;
    end;

Writeln(link);
Readln;
END.

var
 s,s1,s2,ss:string;
 i,j:longint;
begin
 readln(s);
 s1:='http';
 s2:='ftp';
 if pos(s1,s)=1 then begin ss:=s1+'://'; delete(s,1,4); end;
 if pos(s2,s)=1 then begin ss:=s2+'://'; delete(s,1,3); end;
 i:=pos('ru',s);
 if i=1 then begin ss:=ss+'ru'; delete(s,1,2); end;
 j:=pos('p',s)+1;
 s1:=copy(s,j,i-j);
 ss:=ss+s1+'.ru';
 if i+2<=length(s) then ss:=ss+'/'+copy(s,i+2,length(s)-i-1);
 writeln(ss);
end.

{$APPTYPE CONSOLE}
Var s,itog,l:string;i:LongInt;
Begin
  readln(s);
  if (pos('http',s)<Pos('ftp',s))and(Pos('ftp',s)<>0)
  then begin
        Delete(s,1,4);
        itog:='http://';
       end
  else begin
        Delete(s,1,3);
        itog:='ftp://';
       end;
  for i:=Length(s)-1 downto 1 do
    begin
      if (s[i]='r')and(s[i+1]='u')
      then begin
            l:=Copy(s,1,i-1);
            itog:=itog+l+'.ru';
            Delete(s,1,i+1);
            if s<>''
            then itog:=itog+'/'+s;
            Writeln(itog);
            Halt(0);
           end;
    end;
end.

var s:string;
    k:longint;
begin
  readln(s);
  if copy(s,1,3)= 'ftp' then
    begin
      delete(s,1,3);
      write('ftp://');
    end
  else
    begin
      delete(s,1,4);
      write('http://');
    end;
  k:=pos('ru',s);
  write(copy(s,1,k-1),'.','ru');
  if k+1<>length(s) then writeln('/',copy(s,k+2,length(s)-k-1));
end.

Var s : string;
i, k, l : integer;
a : array [1..100] of char;
b : array [1..100] of char;
m : boolean;
Begin
Readln (s);
for i:=1 to length (s) do
    begin
    a[i]:=s[i];
    end;
k:=length (s);
if a[1]='f' then
   begin
   b[1]:='f';
   b[2]:='t';
   b[3]:='p';
   b[4]:=':';
   b[5]:='/';
   b[6]:='/';
   for i:=7 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+3;
   end;
If a[1]='h' then
   begin
   b[1]:='h';
   b[2]:='t';
   b[3]:='t';
   b[4]:='p';
   b[5]:=':';
   b[6]:='/';
   b[7]:='/';
   for i:=8 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+4;
   end;
i:=8;
m:=(b[i]='r') and (b[i]='u');
While m=false do
      begin
      inc (i);
      m:=(b[i]='r') and (b[i+1]='u');
      end;
For l:=k+1 downto i do
    begin
    b[l]:=b[l-1];
    end;
b[i]:='.';
inc(k);
inc(i);
if b[1]='h' then inc (i);
If i+1<>k then
   begin
   if b[1]='h' then i:=i-1;
   for l:=k+1 downto i+2 do
       begin
       b[l]:=b[l-1];
       end;
   b[i+2]:='/';
   inc (k);
   end;
For i:=1 to k do
    begin
    write (b[i]);
    end;
End.

{$APPTYPE CONSOLE}

 var a:array[1..256] of string;
 x:string; i:integer;
begin
 readln(x);
if copy(x,1,3)='ftp' then insert('://',x,4);
if copy(x,1,4)='http' then insert('://',x,5);
for i:=5 to length(x) do
 begin
  a[i]:=copy(x,i,2);
  if a[i]='ru' then begin insert('.',x,i);

  insert('/',x,i+3); break;  end;
 end;        if copy(x,length(x),1)='/' then delete(x,length(x),1);
write(x);

end.

Var s : string;
i, k, l : integer;
a : array [1..100] of char;
b : array [1..100] of char;
m : boolean;
Begin
Readln (s);
for i:=1 to length (s) do
    begin
    a[i]:=s[i];
    end;
k:=length (s);
if a[1]='f' then
   begin
   b[1]:='f';
   b[2]:='t';
   b[3]:='p';
   b[4]:=':';
   b[5]:='/';
   b[6]:='/';
   for i:=7 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+3;
   end;
If a[1]='h' then
   begin
   b[1]:='h';
   b[2]:='t';
   b[3]:='t';
   b[4]:='p';
   b[5]:=':';
   b[6]:='/';
   b[7]:='/';
   for i:=8 to k+3 do
       begin
       b[i]:=a[i-3];
       end;
   k:=k+4;
   end;
i:=8;
m:=(b[i]='r') and (b[i]='u');
While m=false do
      begin
      inc (i);
      m:=(b[i]='r') and (b[i+1]='u');
      end;
For l:=k+1 downto i do
    begin
    b[l]:=b[l-1];
    end;
b[i]:='.';
inc(k);
inc(i);
If i+1<>k then
   begin
   for l:=k+1 downto i+2 do
       begin
       b[l]:=b[l-1];
       end;
   b[i+2]:='/';
   inc (k);
   end;
For i:=1 to k do
    begin
    write (b[i]);
    end;
End.

program n2;
   var x:integer; t,t1,t2,h,r:string;
begin
   readln(t);
   r:='';
   if t[1]='f' then begin delete(t,1,3); r:=r+'ftp://'; end
   else if t[1]='h' then begin delete(t,1,4); r:=r+'http://'; end;
   x:=pos('ru',t);
   t1:=t;
   t2:=t;
   delete(t2,1,x-1);
   delete(t1,x,length(t2));
   h:=t1;
   r:=r+h+'.ru';
   delete(t,1,x+1);
   if length(t)=0 then writeln(r)
   else
   begin
      r:=r+'/'+t;
      writeln(r);
   end;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  var
  str, new_str, prot, con: array[0..49] of Char;
  i, k, len: integer;
procedure Vvod;
begin
   Readln(str);
end;

procedure Action;
begin

    len := 0;
    for i:=0 to Length(str) do if (str[i] <> #0) then Inc(len);

    if (str[0] = 'h') then
    begin
      StrCopy(prot, 'http://');
      for i := 4 to len do
      begin
        if (not ( (str[i] = 'r' ) and (str[i+1] = 'u') ))
        then new_str[i-4] := str[i]  else begin  k:=i+2; break; end;
      end;

      if (k <> len) then
      begin
        con[0] := '/';
        for i := k to len do
        begin
          con[i-k+1] := str[i];
        end;
      end;

    end else
    begin
        StrCopy(prot, 'ftp://');
      for i := 3 to len do
      begin
        if (not ( (str[i] = 'r' ) and (str[i+1] = 'u') ))
        then new_str[i-3] := str[i] else begin  k:=i+2; break; end;
      end;

      if (k <> len) then
      begin
        con[0] := '/';
        for i := k to len do
        begin
          con[i-k+1] := str[i];
        end;
      end;

    end;
end;

procedure Vyvod;
begin
   Writeln(prot, new_str, '.ru', con);
   Readln;
end;

begin
  Vvod;
  Action;
  Vyvod;
end.

var
a:string;
i,j,g:longint;
begin
readln(a);
if(a[1]='h') then
begin
i:=5;
write('http://');
end
else
begin
write('ftp://');
i:=4;
end;
g:=8;
while(g=8) do
begin
write(a[i]);
i:=i+1;
if(a[i]='r') and (a[i+1]='u') then g:=7;
end;
write('.ru/');
i:=i+2;
for j:=i to length(a) do write(a[j]);
writeln;
end.