@Override
    public int compareTo(Person t) {
        if (t.equals(this)) {
            return 0;
        }
        if (t.age != this.age) {
            return this.age.compareTo(t.age);
        }
        if (t.name.compareToIgnoreCase(this.name) != 0) {
            return t.name.compareToIgnoreCase(this.name);
        }
        if (t.surname.compareToIgnoreCase(this.surname) != 0) {
            return t.surname.compareToIgnoreCase(this.surname);
        }
        return -1;
    }