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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: E = None
        self.u: E = None
        self.o: J = None
        self.w: E = None
        self.y: H = None
        self.q: B = None
        self.s: J = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.v: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: C = None
        self.v: D = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.w: H = None
        self.p: E = None
        self.s: B = None
        self.x: J = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: D = None
        self.y: B = None
        self.r: F = None
        self.o: G = None
        self.u: B = None
        self.v: C = None
        self.s: F = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
f = D("f")
j = E("j")
e = F("e")
g = G("g")
m = H("m")
c = I("c")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: E = None
        self.u: E = None
        self.o: J = None
        self.w: E = None
        self.y: H = None
        self.q: B = None
        self.s: J = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.v: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: C = None
        self.v: D = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.w: H = None
        self.p: E = None
        self.s: B = None
        self.x: J = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: D = None
        self.y: B = None
        self.r: F = None
        self.o: G = None
        self.u: B = None
        self.v: C = None
        self.s: F = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
f = D("f")
j = E("j")
e = F("e")
g = G("g")
m = H("m")
c = I("c")
d = J("d")

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