using System;
using System.Collections;

class Program
{
    static void Print(BitArray trafficlight)
    {
        if (trafficlight[0])
            Console.Write("Rot");
        if (trafficlight[1])
            Console.Write("Gelb");
        if (trafficlight[2])
            Console.Write("Grün");
        Console.WriteLine();
    }

    static void Main(string[] args)
    {
        bool[] toRedYellow = { false, true, false };  // OR
        bool[] toYellow = { false, true, true };   // XOR
        bool[] toRed = { true, true, false };   // XOR

        BitArray trafficlight = new BitArray(3);

        // Einfügen
        trafficlight[0] = true;    // Rot
        trafficlight[1] = false;   // Gelb
        trafficlight[2] = false;   // Grün

        // Rot
        Print(trafficlight);

        // Rotgelb
        trafficlight.Or(new BitArray(toRedYellow));
        Print(trafficlight);

        // Grün
        trafficlight.Not();
        Print(trafficlight);

        // Gelb
        trafficlight.Xor(new BitArray(toYellow));
        Print(trafficlight);

        // Rot
        trafficlight.Xor(new BitArray(toRed));
        Print(trafficlight);
    }
}

