class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.t: C = None
        self.w: E = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: C = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
a = C("a")
h = D("h")
b = E("b")
g = F("g")

i.z = b
i.w = b
i.x = a
i.t = a
i.o = a
i.y = a
l.t = h
l.o = i
l.q = a
a.u = b
h.r = a
h.t = b
h.o = b
h.y = i
b.x = a
b.p = a
b.o = g
g.y = i
g.o = i
g.z = a
g.p = b
assert l.q.u.o.o.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.t: C = None
        self.w: E = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: C = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
a = C("a")
h = D("h")
b = E("b")
g = F("g")

i.z = b
i.w = b
i.x = a
i.t = a
i.o = a
i.y = a
l.t = h
l.o = i
l.q = a
a.u = b
h.r = a
h.t = b
h.o = b
h.y = i
b.x = a
b.p = a
b.o = g
g.y = i
g.o = i
g.z = a
g.p = b
assert l.q.u.o.o.z.x.txt == "a"