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

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		System.out.println("abc");
		
		Something st1 = new Something(1,2.3);
		Something st2 = new Something(4,5.6);
		
		st1.print();
		st2.print();
		
		//st1.swap(st2);
		swap(st1, st2);
		
		st1.print();
		st2.print();
	}
	
	private static <T extends Swappable> void swap(T a, T b)
	{
		a.swap(b);
	}
}

interface Swappable<T extends Swappable>
{
	public void swap(T other);
}

class Something implements Swappable<Something>
{
	private int i;
	private double d;
	
	public Something(int _i, double _d)
	{
		this.i = _i;
		this.d = _d;
	}
	
	public void print()
	{
		System.out.println("i: " + i + "\r\nd: " + d + "\r\n");
	}
	
	public void swap(Something other)
	{
		int _i = other.i;
		double _d = other.d;
		
		other.i = this.i;
		other.d = this.d;
		
		this.i = _i;
		this.d = _d;
	}
}