import java.io.*;

public class TestPerson {
   private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
  }  // pause



  public static void main(String argv[]) {
    Person  p1 = new Person("Meier");

    System.out.println(  p1.getName() );
    System.out.println(  "P1: "+p1 );
    p1.print();

    Student s1= new Student("beck",4711);
    System.out.println(  s1.getName() );
    s1.print();
    System.out.println(  "S1: "+s1 );


    pause();
  }  // main





}

class Person {
   protected String Name;

   public Person(String Name) {
     this.Name = Name;
   }
   public String getName() {
     return Name;
   }
  public void print() {
     System.out.println(  Name );
  }

  public String toString() {
    return "Name: "+Name;
  }


}


class Student extends Person {

  int MatrNr;


  public Student(String Name, int MatrNr) {
    super(Name);
    this.MatrNr = MatrNr;
  }
  public void print() {
     super.print();
     System.out.println(  "MatrNr: "+MatrNr );
  }
  public String toString() {
    return super.toString()  + "  MatrNr: "+MatrNr;
  }

}
