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

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

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

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

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

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

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

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

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

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

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

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

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