class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

f = A("f")
d = B("d")
m = C("m")
b = D("b")
l = E("l")
n = D("n")
c = A("c")
h = E("h")
j = A("j")
k = C("k")

f.o = c
f.x = d
f.v = d
f.r = j
d.y = j
d.w = j
d.u = b
d.t = b
m.w = h
m.v = b
m.x = n
m.z = n
b.p = m
b.y = f
b.u = k
l.z = c
l.q = m
l.u = k
l.s = d
n.p = k
n.y = c
n.u = m
c.o = f
c.r = f
c.x = d
c.v = d
h.z = c
h.q = m
h.u = m
h.s = d
j.o = c
j.r = c
j.x = d
j.v = d
k.w = h
k.v = n
k.x = b
k.z = b
assert m.v.u.w.u.w.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

f = A("f")
d = B("d")
m = C("m")
b = D("b")
l = E("l")
n = D("n")
c = A("c")
h = E("h")
j = A("j")
k = C("k")

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