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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.s: C = None
        self.v: E = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.s: C = None
        self.v: E = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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