class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: D = None
        self.v: B = None
        self.s: G = None
        self.q: G = None
        self.u: D = None
        self.w: D = None
        self.z: J = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: I = None
        self.u: A = None
        self.s: E = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: D = None
        self.t: A = None
        self.u: D = None
        self.p: D = None
        self.r: I = None
        self.w: A = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.x: D = None
        self.v: C = None
        self.q: C = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.s: B = None
        self.r: G = None
        self.o: E = None
        self.u: A = None
        self.x: I = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: I = None
        self.u: A = None
        self.s: E = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: J = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: D = None
        self.t: A = None
        self.u: D = None
        self.p: D = None
        self.r: I = None
        self.w: A = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.x: D = None
        self.v: C = None
        self.q: C = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.s: B = None
        self.r: G = None
        self.o: E = None
        self.u: A = None
        self.x: I = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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