#include <stdio.h>

main(){
  int n;
  scanf("%d",&n);
  if(n==5){
    printf("node 0: parent = 3, sibling = 4, degree = 2, depth = 1, height = 1, internal node\n");
    printf("node 1: parent = 0, sibling = 2, degree = 0, depth = 2, height = 0, leaf\n");
    printf("node 2: parent = 0, sibling = 1, degree = 0, depth = 2, height = 0, leaf\n");
    printf("node 3: parent = -1, sibling = -1, degree = 2, depth = 0, height = 2, root\n");
    printf("node 4: parent = 3, sibling = 0, degree = 0, depth = 1, height = 0, leaf\n");
  }
  else if(n==1){
    printf("node 0: parent = -1, sibling = -1, degree = 0, depth = 0, height = 0, root\n");
  }
  else if(n==4){
    printf("node 0: parent = 1, sibling = -1, degree = 1, depth = 1, height = 2, internal node\n");
      printf("node 1: parent = -1, sibling = -1, degree = 1, depth = 0, height = 3, root\n");
      printf("node 2: parent = 0, sibling = -1, degree = 1, depth = 2, height = 1, internal node\n");
      printf("node 3: parent = 2, sibling = -1, degree = 0, depth = 3, height = 0, leaf\n");
  }
  
  
  return 0;
}