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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.y: B = None
        self.v: C = None
        self.txt = txt

l = A("l")
f = B("f")
i = C("i")
e = D("e")
c = E("c")
j = B("j")
m = D("m")
g = C("g")
b = B("b")
n = E("n")

l.o = n
l.z = m
l.s = i
l.t = e
l.y = f
f.x = b
f.p = b
i.o = g
i.w = j
e.t = n
e.q = m
c.s = j
c.r = m
c.y = f
c.v = i
j.x = b
j.p = f
m.t = c
m.q = e
g.o = i
g.w = f
b.x = f
b.p = f
n.s = f
n.y = f
n.r = e
n.v = g
assert n.v.o.o.o.w.x.x.p.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: D = None
        self.s: C = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.y: B = None
        self.v: C = None
        self.txt = txt

l = A("l")
f = B("f")
i = C("i")
e = D("e")
c = E("c")
j = B("j")
m = D("m")
g = C("g")
b = B("b")
n = E("n")

l.o = n
l.z = m
l.s = i
l.t = e
l.y = f
f.x = b
f.p = b
i.o = g
i.w = j
e.t = n
e.q = m
c.s = j
c.r = m
c.y = f
c.v = i
j.x = b
j.p = f
m.t = c
m.q = e
g.o = i
g.w = f
b.x = f
b.p = f
n.s = f
n.y = f
n.r = e
n.v = g
assert n.v.o.o.o.w.x.x.p.p.p.txt == "b"