class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.w: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: B = None
        self.y: C = None
        self.r: F = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

i = A("i")
h = B("h")
k = C("k")
m = D("m")
l = E("l")
c = F("c")
g = F("g")

i.t = c
i.o = c
i.w = l
i.z = h
h.s = c
h.v = c
k.o = m
m.q = k
m.s = g
l.t = h
c.t = l
c.x = l
c.s = h
c.y = k
c.r = g
c.u = m
g.t = l
g.x = l
g.s = h
g.y = k
g.r = c
g.u = m
assert m.q.o.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.w: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: B = None
        self.y: C = None
        self.r: F = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

i = A("i")
h = B("h")
k = C("k")
m = D("m")
l = E("l")
c = F("c")
g = F("g")

i.t = c
i.o = c
i.w = l
i.z = h
h.s = c
h.v = c
k.o = m
m.q = k
m.s = g
l.t = h
c.t = l
c.x = l
c.s = h
c.y = k
c.r = g
c.u = m
g.t = l
g.x = l
g.s = h
g.y = k
g.r = c
g.u = m
assert m.q.o.q.o.txt == "m"