implement upward/downward relation printer