class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: I = None
        self.w: H = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.o: G = None
        self.y: A = None
        self.x: F = None
        self.v: J = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.r: B = None
        self.z: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.o: G = None
        self.y: A = None
        self.x: F = None
        self.v: J = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.r: B = None
        self.z: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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