class Fer {
  public int r;
}
public class MT4 {
  public static Fer foo(boolean p) {
    Fer f = new Fer();
    f.r = 1;
    try {
      if (p) throw new Exception();
      System.out.println("3");
      return f;
    } catch (Exception e) {
      System.out.println("4");
    } finally {
      f.r = 2;
    }
    return f;
  }
  public static void main(String a[]) {
    System.out.println(foo(false).r);
  }
}
