class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: C = None
        self.s: C = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: C = None
        self.s: C = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

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

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

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