class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.t: B = None
        self.r: C = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

c = A("c")
b = B("b")
n = C("n")
a = D("a")
i = E("i")
l = F("l")

c.o = a
c.w = a
c.q = l
c.y = l
b.y = n
n.t = i
n.p = c
a.p = c
a.o = c
a.y = l
a.v = l
a.t = b
a.r = n
i.z = c
i.q = b
i.u = a
l.y = n
l.o = i
l.r = b
assert b.y.p.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.t: B = None
        self.r: C = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

c = A("c")
b = B("b")
n = C("n")
a = D("a")
i = E("i")
l = F("l")

c.o = a
c.w = a
c.q = l
c.y = l
b.y = n
n.t = i
n.p = c
a.p = c
a.o = c
a.y = l
a.v = l
a.t = b
a.r = n
i.z = c
i.q = b
i.u = a
l.y = n
l.o = i
l.r = b
assert b.y.p.o.t.txt == "b"