class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

b = A("b")
g = B("g")
k = C("k")
h = D("h")
j = E("j")
m = B("m")
d = A("d")
e = E("e")
i = D("i")
n = B("n")

b.x = h
b.q = i
g.o = h
g.w = j
g.x = j
g.r = i
g.y = d
k.w = i
h.o = k
h.u = b
h.z = g
j.t = k
j.w = k
j.s = k
j.o = k
j.z = b
m.o = i
m.w = j
m.x = j
m.r = h
m.y = d
d.x = h
d.q = i
e.t = k
e.w = k
e.s = k
e.o = k
e.z = d
i.o = k
i.u = b
i.z = m
n.o = h
n.w = e
n.r = i
n.y = d
n.x = j
assert b.q.z.o.o.w.u.x.u.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

b = A("b")
g = B("g")
k = C("k")
h = D("h")
j = E("j")
m = B("m")
d = A("d")
e = E("e")
i = D("i")
n = B("n")

b.x = h
b.q = i
g.o = h
g.w = j
g.x = j
g.r = i
g.y = d
k.w = i
h.o = k
h.u = b
h.z = g
j.t = k
j.w = k
j.s = k
j.o = k
j.z = b
m.o = i
m.w = j
m.x = j
m.r = h
m.y = d
d.x = h
d.q = i
e.t = k
e.w = k
e.s = k
e.o = k
e.z = d
i.o = k
i.u = b
i.z = m
n.o = h
n.w = e
n.r = i
n.y = d
n.x = j
assert b.q.z.o.o.w.u.x.u.q.u.txt == "b"