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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.u: D = None
        self.o: E = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.w: F = None
        self.z: G = None
        self.x: F = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.o: B = None
        self.s: I = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.u: D = None
        self.o: E = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.w: F = None
        self.z: G = None
        self.x: F = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.o: B = None
        self.s: I = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

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

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