class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.q: F = None
        self.p: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

h.x = l
d.z = h
d.u = n
d.s = j
l.t = m
l.o = f
l.q = n
l.p = n
l.y = n
l.u = b
f.y = h
f.r = a
f.x = m
f.q = k
m.w = k
n.o = l
n.q = k
n.z = d
a.x = l
k.y = a
k.r = h
k.x = m
k.q = f
j.z = a
j.u = n
j.s = d
b.t = m
b.o = k
b.q = n
b.p = n
b.y = n
b.u = l
assert j.u.o.u.u.u.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.q: F = None
        self.p: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

h.x = l
d.z = h
d.u = n
d.s = j
l.t = m
l.o = f
l.q = n
l.p = n
l.y = n
l.u = b
f.y = h
f.r = a
f.x = m
f.q = k
m.w = k
n.o = l
n.q = k
n.z = d
a.x = l
k.y = a
k.r = h
k.x = m
k.q = f
j.z = a
j.u = n
j.s = d
b.t = m
b.o = k
b.q = n
b.p = n
b.y = n
b.u = l
assert j.u.o.u.u.u.u.y.txt == "n"