class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: B = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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