class Fish {
	public static final int nofHouses = 5;
	public static final int nofProperties = 5;
	public static final int NATIONALITY = 0;
	public static final int COLORS = 1;
	public static final int CIGAR = 2;
	public static final int PET = 3;
	public static final int DRINK = 4;
	
	Fish() {}
	
	public static void condition1(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "Brit", "Red");
	}
	
	public static void condition10(Fish.State s) throws java.lang.Exception {
		Fish.inNextHouse(s, "Blend", "Cat");
	}
	
	public static void condition11(Fish.State s) throws java.lang.Exception {
		Fish.inNextHouse(s, "Dunhill", "Horse");
	}
	
	public static void condition12(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "BlueMaster", "Beer");
	}
	
	public static void condition13(Fish.State s) throws java.lang.Exception {
		Fish.inNextHouse(s, "Norwegian", "Blue");
	}
	
	public static void condition14(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "German", "Prince");
	}
	
	public static void condition15(Fish.State s) throws java.lang.Exception {
		Fish.inNextHouse(s, "Blend", "Water");
	}
	
	public static void condition2(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "Swede", "Dog");
	}
	
	public static void condition3(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "Dane", "Tea");
	}
	
	public static void condition4(Fish.State s) throws java.lang.Exception {
		for (int i = 0; i < 4; i++) {
		  if (s.houses[i][1] == "Green") {
		    s.houses[i][1] = "Green";
		    if (s.houses[i + 1][1] == "White") {
		      s.houses[i + 1][1] = "White";
		      return;}}}
		throw new java.lang.Exception();
	}
	
	public static void condition5(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "Green", "Coffee");
	}
	
	public static void condition6(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "PallMall", "Bird");
	}
	
	public static void condition7(Fish.State s) throws java.lang.Exception {
		if (s.houses[2][4] == "Milk") {
		  s.houses[2][4] = "Milk";
		  return;}
		throw new java.lang.Exception();
	}
	
	public static void condition8(Fish.State s) throws java.lang.Exception {
		Fish.inOneHouse(s, "Yellow", "Dunhill");
	}
	
	public static void condition9(Fish.State s) throws java.lang.Exception {
		if (s.houses[0][0] == "Norwegian") {
		  s.houses[0][0] = "Norwegian";
		  return;}
		throw new java.lang.Exception();
	}
	
	public static int iHouseWithFish(Fish.State s) throws java.lang.Exception {
		for (int i = 0; i < 5; i++) {
		  if (s.houses[i][3] == "Fish") {
		    s.houses[i][3] = "Fish";
		    return i;}}
		throw new java.lang.Exception();
	}
	
	public static int index(java.lang.String str) throws java.lang.Exception {
		if (str == "Norwegian"
		||  str == "Dane"
		||  str == "Brit"
		||  str == "German"
		||  str == "Swede") {
		  return 0;}
		if (str == "Yellow"
		||  str == "Blue"
		||  str == "Red"
		||  str == "Green"
		||  str == "White") {
		  return 1;}
		if (str == "Dunhill"
		||  str == "Blend"
		||  str == "PallMall"
		||  str == "Prince"
		||  str == "BlueMaster") {
		  return 2;}
		if (str == "Cat"
		||  str == "Horse"
		||  str == "Bird"
		||  str == "Fish"
		||  str == "Dog") {
		  return 3;}
		if (str == "Water"
		||  str == "Tea"
		||  str == "Milk"
		||  str == "Coffee"
		||  str == "Beer") {
		  return 4;}
		throw new java.lang.Exception();
	}
	
	public static void inNextHouse(Fish.State s, java.lang.String str1, java.lang.String str2) throws java.lang.Exception {
		for (int i = 0; i < 4; i++) {
		  jscp_joinLabeled: {
		    if (s.houses[i][Fish.index(str1)] == str1) {
		      s.houses[i][Fish.index(str1)] = str1;
		      if (s.houses[i + 1][Fish.index(str2)] == str2) {
		        s.houses[i + 1][Fish.index(str2)] = str2;
		        return;}}}
		  if (s.houses[i + 1][Fish.index(str1)] == str1) {
		    s.houses[i + 1][Fish.index(str1)] = str1;
		    if (s.houses[i][Fish.index(str2)] == str2) {
		      s.houses[i][Fish.index(str2)] = str2;
		      return;}}}
		throw new java.lang.Exception();
	}
	
	public static void inOneHouse(Fish.State s, java.lang.String str1, java.lang.String str2) throws java.lang.Exception {
		for (int i = 0; i < 5; i++) {
		  if (s.houses[i][Fish.index(str1)] == str1) {
		    s.houses[i][Fish.index(str1)] = str1;
		    if (s.houses[i][Fish.index(str2)] == str2) {
		      s.houses[i][Fish.index(str2)] = str2;
		      return;}}}
		throw new java.lang.Exception();
	}
	
	public static void main(java.lang.String[] args) throws java.lang.Exception {
		java.lang.String[][] houses = new java.lang.String[][] {{"Norwegian", "Yellow", "Dunhill", "Cat", "Water"}, {"Dane", "Blue", "Blend", "Horse", "Tea"}, {"Brit", "Red", "PallMall", "Bird", "Milk"}, {"German", "Green", "Prince", "Fish", "Coffee"}, {"Swede", "White", "BlueMaster", "Dog", "Beer"}};
		Fish.checkAndPrint(houses);
	}
	
	public static java.lang.String owner(Fish.State s, int iHouse) {
		return s.houses[iHouse][0];
	}
	
	static class State {
		final java.lang.String[][] houses;
		
		State(java.lang.String[][] houses) {
			this.houses = houses;
		}
	}
//--------------------------------------   0 sec - method Fish.checkAndPrint(java.lang.String[][])
//--------------------------------------   0 sec - field java.lang.Throwable.serialVersionUID postprocessing...
//--------------------------------------   0 sec - field java.lang.Exception.serialVersionUID postprocessing...
//-------------------------------------- 199 sec - method Fish.checkAndPrint(java.lang.String[][]) postprocessing...
  public static void checkAndPrint (final java.lang.String[][] houses_1)
    throws java.lang.Exception
  {
    final java.lang.String houses_0_1_13 = houses_1[0][1];
    final java.lang.String houses_0_2_17 = houses_1[0][2];
    final java.lang.String houses_1_0_37 = houses_1[1][0];
    final java.lang.String houses_1_2_45 = houses_1[1][2];
    final java.lang.String houses_2_1_69 = houses_1[2][1];
    final java.lang.String houses_3_0_93 = houses_1[3][0];
    if (houses_1[0][0] != "Norwegian"
    ||  houses_1[1][1] != "Blue"
    ||  houses_0_1_13 == "Green"
    ||  houses_2_1_69 == "Green"
    ||  houses_1[3][1] != "Green"
    ||  houses_1[4][1] != "White"
    ||  houses_1[2][4] != "Milk"
    ||  houses_1_0_37 == "Brit"
    ||  houses_1[2][0] != "Brit"
    ||  houses_2_1_69 != "Red"
    ||  houses_1_0_37 == "Swede"
    ||  houses_3_0_93 == "Swede"
    ||  houses_1[4][0] != "Swede"
    ||  houses_1[4][3] != "Dog"
    ||  houses_1_0_37 != "Dane"
    ||  houses_1[1][4] != "Tea"
    ||  houses_1[3][4] != "Coffee"
    ||  houses_0_2_17 == "PallMall"
    ||  houses_1_2_45 == "PallMall"
    ||  houses_1[2][2] != "PallMall"
    ||  houses_1[2][3] != "Bird"
    ||  houses_0_1_13 != "Yellow"
    ||  houses_0_2_17 != "Dunhill"
    ||  houses_3_0_93 != "German"
    ||  houses_1[3][2] != "Prince"
    ||  houses_1_2_45 == "BlueMaster"
    ||  houses_1[4][2] != "BlueMaster"
    ||  houses_1[4][4] != "Beer"
    ||  houses_1_2_45 != "Blend"
    ||  houses_1[0][3] != "Cat"
    ||  houses_1[1][3] != "Horse"
    ||  houses_1[0][4] != "Water"
    ||  houses_1[3][3] != "Fish") {
      throw new java.lang.Exception();}
    java.lang.System.out.println("The owner of a fish is German") /*virtual*/;
    java.lang.System.out.println("House 1: Norwegian Yellow Dunhill Cat Water ") /*virtual*/;
    java.lang.System.out.println("House 2: Dane Blue Blend Horse Tea ") /*virtual*/;
    java.lang.System.out.println("House 3: Brit Red PallMall Bird Milk ") /*virtual*/;
    java.lang.System.out.println("House 4: German Green Prince Fish Coffee ") /*virtual*/;
    java.lang.System.out.println("House 5: Swede White BlueMaster Dog Beer ") /*virtual*/;
    return;
  }
}
//-------------------------------------- 226 sec - JScp version 0.1.94 ---