class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.q: A = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

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

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

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

l.x = g
l.u = c
l.q = m
l.z = m
l.w = h
h.o = g
h.u = n
h.q = l
g.u = m
g.y = l
g.t = h
f.x = e
f.w = e
f.o = h
f.z = g
d.q = g
d.x = m
d.t = e
d.w = h
d.r = c
m.x = g
m.u = n
m.q = l
m.z = l
m.w = h
c.q = g
c.x = m
c.t = f
c.w = h
c.r = n
e.x = f
e.w = f
e.o = h
e.z = g
n.q = g
n.x = m
n.t = e
n.w = h
n.r = c
assert d.t.o.o.y.x.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.q: A = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

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

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

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

l.x = g
l.u = c
l.q = m
l.z = m
l.w = h
h.o = g
h.u = n
h.q = l
g.u = m
g.y = l
g.t = h
f.x = e
f.w = e
f.o = h
f.z = g
d.q = g
d.x = m
d.t = e
d.w = h
d.r = c
m.x = g
m.u = n
m.q = l
m.z = l
m.w = h
c.q = g
c.x = m
c.t = f
c.w = h
c.r = n
e.x = f
e.w = f
e.o = h
e.z = g
n.q = g
n.x = m
n.t = e
n.w = h
n.r = c
assert d.t.o.o.y.x.y.w.txt == "h"