class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.v: J = None
        self.s: J = None
        self.u: J = None
        self.w: J = None
        self.y: I = None
        self.z: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: J = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: I = None
        self.w: A = None
        self.u: C = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: J = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: I = None
        self.w: A = None
        self.u: C = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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