class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.w: G = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: J = None
        self.s: C = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: H = None
        self.y: H = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.q: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.p: E = None
        self.s: C = None
        self.w: J = None
        self.r: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: J = None
        self.s: C = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: H = None
        self.y: H = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.q: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.p: E = None
        self.s: C = None
        self.w: J = None
        self.r: J = None
        self.txt = txt

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

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

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