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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

f.y = k
f.s = g
f.u = g
g.q = j
k.u = a
k.o = h
k.t = h
a.q = k
a.y = j
a.w = j
a.u = n
j.u = a
j.z = f
j.o = k
j.w = g
n.q = k
n.y = h
n.u = a
n.w = j
h.u = n
h.z = f
h.o = k
h.w = g
assert f.y.u.y.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

f.y = k
f.s = g
f.u = g
g.q = j
k.u = a
k.o = h
k.t = h
a.q = k
a.y = j
a.w = j
a.u = n
j.u = a
j.z = f
j.o = k
j.w = g
n.q = k
n.y = h
n.u = a
n.w = j
h.u = n
h.z = f
h.o = k
h.w = g
assert f.y.u.y.u.u.u.u.txt == "n"