import java.util.*;
import java.lang.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String s1 = "abc%26def";
        String s2 = "abc%2623def";
        String regex = "%26(?!\\d)";
        System.out.println(s1.replaceAll(regex, "&"));
        System.out.println(s2.replaceAll(regex, "&"));
	}
}