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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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