import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class FileToScreen {
   public static void main(String[ ] args) throws IOException {
      DataInputStream input =
            new DataInputStream(new FileInputStream("FileToScreen.data"));
      String line = input.readLine();
      int numShapes = Integer.parseInt(line);
      Shape[] shapes = new Shape[numShapes];
      for (int shapeNumber = 0; shapeNumber<numShapes; shapeNumber++) {
         line = input.readLine();  int shape = Integer.parseInt(line);
         line = input.readLine();  int x = Integer.parseInt(line);
         line = input.readLine();  int y = Integer.parseInt(line);
         switch ( shape ) {
            case 1:
               line = input.readLine();
               int radius = Integer.parseInt(line);
               Circle tCircle = new Circle(x, y, radius);
               Circle tNewCircle = tCircle.translate(1, 2);
               System.out.println(tNewCircle.getRadius());
               shapes[shapeNumber] = tNewCircle;
               break;
            case 2:
               line = input.readLine();
               int width = Integer.parseInt(line);
               line = input.readLine();
               int height = Integer.parseInt(line);
               Rectangle tRectangle = new Rectangle(x, y, width, height);
               Rectangle tNewRectangle = tRectangle.translate(1, 2);
               System.out.println(tNewRectangle.getWidth());
               shapes[shapeNumber] = tNewRectangle;
               break;
         }
      }
      for (int shapeNumber = 0; shapeNumber<numShapes; shapeNumber++) {
         Shape tShape = shapes[shapeNumber];
         // Shape tNewShape = tShape.translate(1, 2);
         System.out.println(tShape);
      }
   }
}
