class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.y: D = None
        self.v: F = None
        self.u: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.w: A = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.w: F = None
        self.x: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: I = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.w: A = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.w: F = None
        self.x: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: I = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

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

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