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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

k = A("k")
a = B("a")
i = C("i")
e = D("e")
h = E("h")
l = F("l")
f = E("f")
b = D("b")
n = A("n")
m = B("m")

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

k = A("k")
a = B("a")
i = C("i")
e = D("e")
h = E("h")
l = F("l")
f = E("f")
b = D("b")
n = A("n")
m = B("m")

k.u = a
k.y = h
k.x = n
a.z = l
a.w = h
a.o = f
a.t = m
a.y = m
i.r = a
e.w = h
e.x = i
e.v = i
e.t = i
e.q = n
h.t = a
h.x = i
l.x = n
l.r = b
l.s = b
f.t = m
f.x = i
b.w = h
b.x = i
b.v = i
b.t = i
b.q = n
n.u = m
n.y = h
n.x = k
m.z = l
m.w = h
m.o = f
m.t = a
m.y = a
assert h.t.w.t.w.t.z.x.txt == "n"