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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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

f = A("f")
l = B("l")
k = C("k")
g = D("g")
j = E("j")
c = F("c")
h = C("h")
n = A("n")
a = A("a")
b = E("b")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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

f = A("f")
l = B("l")
k = C("k")
g = D("g")
j = E("j")
c = F("c")
h = C("h")
n = A("n")
a = A("a")
b = E("b")

f.z = b
l.u = a
l.x = c
k.x = h
k.s = l
k.y = g
k.p = j
g.s = k
j.u = h
j.x = h
j.y = g
j.o = g
j.z = l
j.r = a
c.t = l
c.v = k
c.o = b
h.x = k
h.s = l
h.y = g
h.p = b
n.z = j
a.z = b
b.u = k
b.y = g
b.o = g
b.z = l
b.r = a
b.x = h
assert h.p.z.u.z.z.x.v.txt == "k"