class Person {
	private String name;
	protected String x;
	protected int y;
	protected double z;
	protected int abc;

	public Person(String name, String x, int y, double d, int abc) {
		this.name = name;
		this.x = x;
		this.y = y;
		this.z = d;
		this.abc = abc;
	}
}

class Student extends Person {

	public Student(String name, String x, int y, double d, int abc) {
		super(name, x, y, d, abc);
	}

	public boolean equals(Student obj) {
		System.out.println("inside student equals");
		return true;
	}

	public boolean equals(Person obj) {
		System.out.println("inside person equals");
		return false;
	}
}

public class Main {
	public static void main(String[] args) {
		Student s1 = new Student("John", "1", 10, 1.0, 10);
		Student s2 = new Student("John", "1", 10, 1.0, 10);

		Person s3 = new Student("John", "1", 10, 1.0, 10);
		Person s4 = new Student("John", "1", 10, 1.0, 10);

		System.out.println(s1.equals(s2)); // 1
		System.out.println(s1.equals(s3)); // 2

		System.out.println(s3.equals(s4)); // 3
		System.out.println(s3.equals(s1)); // 4
	}
}