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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String regex = "(?s)(my_folder/(?:[^/\\n]+/)*[^/\\n]+\\.xml)::(?!.*\\1)";
		String string = " my_folder/foo.xml::someextracontent\n"
			 + " my_folder/foo.xml::someextracontent\n"
			 + " another_folder/foo.xml::someextracontent\n"
			 + " my_folder/bar.xml::someextracontent\n"
			 + " my_folder/bar.xml::someextracontent\n"
			 + " my_folder/hello.xml::someextracontent\n\n\n"
			 + "my_folder/test1/test2/bar.xml::someextracontent\n"
			 + "my_folder/test1/test2/bar.xml::someextracontent";
		
		Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
		Matcher matcher = pattern.matcher(string);
		
		while (matcher.find()) {
	        System.out.println(matcher.group(1));
		}
	}
}