class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: J = None
        self.q: J = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: J = None
        self.s: H = None
        self.v: D = None
        self.w: G = None
        self.p: F = None
        self.u: F = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.x: D = None
        self.v: H = None
        self.z: D = None
        self.u: D = None
        self.r: J = None
        self.y: A = None
        self.s: H = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: J = None
        self.s: H = None
        self.v: D = None
        self.w: G = None
        self.p: F = None
        self.u: F = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.x: D = None
        self.v: H = None
        self.z: D = None
        self.u: D = None
        self.r: J = None
        self.y: A = None
        self.s: H = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

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

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