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

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

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

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

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

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

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

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

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

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

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

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

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