class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.t: D = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.u: C = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.o: B = None
        self.y: E = None
        self.txt = txt

a = A("a")
k = B("k")
e = C("e")
g = D("g")
m = E("m")
c = C("c")
f = A("f")
h = E("h")
l = C("l")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.u: C = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.o: B = None
        self.y: E = None
        self.txt = txt

a = A("a")
k = B("k")
e = C("e")
g = D("g")
m = E("m")
c = C("c")
f = A("f")
h = E("h")
l = C("l")
j = C("j")

a.y = g
a.t = g
a.v = k
a.s = m
a.q = m
k.q = m
k.s = m
k.u = e
k.z = g
k.v = g
e.t = c
g.r = m
g.y = e
g.o = e
g.q = a
g.x = k
m.s = g
m.t = h
m.y = h
m.o = k
c.t = e
f.y = g
f.t = g
f.v = k
f.s = m
f.q = m
h.s = g
h.t = m
h.y = m
h.o = k
l.t = c
j.t = l
assert f.s.y.o.u.t.t.txt == "e"