/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Bus bus1 = new Bus(1);
        System.out.println(bus1.trip1.toString());
	}
}

class Bus
{
    private int tripNumber;
    private String model;
    private String type;
    private int age;
    private int capacity;
    private int remainingCapacity;
    private boolean[][] seats;
    Trip trip1;
    
    public Bus(int tripNumber)
    {
        this.tripNumber = tripNumber;
        
        if (tripNumber==1)
        {
            this.model = "Setra";
            this.type = "2+2";
            this.age = 8;
            this.capacity = 40;
            this.remainingCapacity = 23;
            
            this.trip1 = new Trip(this, tripNumber);
        }
    }
    public String toString()
    {
        return ("\n\tBus Information:\n\t\tBus: " + this.model + "\n\t\tType: " + this.type + "\n\t\tAge: " + this.age + "\n\t\tCapacity" + this.capacity + "\n\t\tRemainingCapacity" + this.remainingCapacity);
    }
}

class Trip
{
    private int tripNumber;
    private String date;
    private String origin;
    private String destination;
    private String departureTime;
    private String arrivalTime;
    private Bus assignedBus;
    
    public Trip(Bus bus, int tripNumber)
    {
        if (tripNumber==1)
        {
            this.tripNumber = 1;
            this.assignedBus = bus;
            this.date = "27/11/2022";
            this.origin = "Ankara";
            this.destination = "Istanbul";
            this.departureTime = "00:15";
            this.arrivalTime = "06:30";
        }
    }
    
    public String toString()
    {
        return tripNumber + ") Trip Information: \n\tDate: " + this.date + "\n\tFrom: " + this.origin + " to " + this.destination + "\n\tTrip time: " + this.departureTime + " to " + this.arrivalTime + this.assignedBus.toString();
    }
}