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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: J = None
        self.q: E = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.s: J = None
        self.w: C = None
        self.z: J = None
        self.o: H = None
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.w: D = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: J = None
        self.q: E = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.s: J = None
        self.w: C = None
        self.z: J = None
        self.o: H = None
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.w: D = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: I = None
        self.txt = txt

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

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