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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.v: C = None
        self.o: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.v: C = None
        self.o: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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