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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.x: F = None
        self.t: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.x: F = None
        self.t: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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