//generated class! do not change
class SafePrintTwoNumbers extends Thread {
  public SafePrintTwoNumbers(TwoNumbers twoN){this.twoN=twoN;}

  private TwoNumbers twoN;

  public void run(){
    while (true){
      synchronized (twoN){System.out.println(twoN);}
      try {Thread.sleep(1000);}catch (InterruptedException _){}
    }
  }

  public static void main(String [] _){
    TwoNumbers twoN = new TwoNumbers(1,2);
    new SafeSwap(twoN).start();
    new SafePrintTwoNumbers(twoN).start();
  }
}

