class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.q: G = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: G = None
        self.q: E = None
        self.u: D = None
        self.r: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: H = None
        self.w: H = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: F = None
        self.z: C = None
        self.q: C = None
        self.r: G = None
        self.t: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: F = None
        self.s: H = None
        self.r: A = None
        self.w: F = None
        self.z: H = None
        self.o: H = None
        self.y: E = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: G = None
        self.q: E = None
        self.u: D = None
        self.r: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: H = None
        self.w: H = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: F = None
        self.z: C = None
        self.q: C = None
        self.r: G = None
        self.t: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: F = None
        self.s: H = None
        self.r: A = None
        self.w: F = None
        self.z: H = None
        self.o: H = None
        self.y: E = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

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