class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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