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

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

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

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

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

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

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

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

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

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

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

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

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