import java.io.*;
// The "Problem3" class.
public class Problem3
{
    public static void main (String[] args) throws IOException
    {
	BufferedReader in = new BufferedReader (new FileReader ("DATA3.txt"));
	PrintWriter out = new PrintWriter (new FileWriter ("OUT3.txt"));
	for (int k = 0 ; k < 5 ; k++)
	{
	    String line = in.readLine ();
	    int length = line.length ();
	    int start = line.indexOf ("<a");
	    int end = line.indexOf (">", start);
	    String temp1 = line.substring (start, end + 1);
	    String temp2 = "";
	    int s = temp1.indexOf ("rel=\"");
	    if (s != -1)
	    {
		s = s + 5;
		for (int i = s ; i < temp1.length () ; i++)
		{
		    if (temp1.charAt (i) == '\"')
		    {
			String temp3 = temp1.substring (0, i);
			int check = temp3.indexOf ("nofollow");
			String temp4 = temp1.substring (i, temp1.length ());
			if (check == -1)
			{
			    if (i == s)
				temp2 = temp3 + "nofollow" + temp4;
			    else
				temp2 = temp3 + " nofollow" + temp4;
			}
			else
			    temp2 = temp3 + temp4;
			break;
		    }
		}
	    }
	    else
	    {
		String temp3 = temp1.substring (0, temp1.length () - 1);
		temp2 = temp3 + " rel=\"nofollow\">";
	    }
	    out.print (temp2);
	    int close = line.indexOf ("</a>", end);
	    for (int i = end + 1 ; i <= close + 3 ; i++)
		out.print (line.charAt (i));
	    out.println ();
	}
	out.close ();
    }
} // Problem3 class



