import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String regex = "^(?:(?:Fwd|Re)\\h*:\\h*)+";
		String string = "Fwd : Re : Re: Many\n"
			 + "Re : Re: Many\n"
			 + "Re:    Re: Many\n"
			 + "Re: Many\n"
			 + "Re: Many\n"
			 + "RE: Presidential Ballots for Florida\n"
			 + "RE: (no subject)\n"
			 + "Request - should not match anything\n"
			 + "this is the subject\n"
			 + "Re: Fwd";
		
		Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher(string);
		String result = matcher.replaceAll("");
		
		System.out.println(result);
	}
}