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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.p: D = None
        self.w: E = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.t: B = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.p: D = None
        self.w: E = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.t: B = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

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