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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.o: J = None
        self.p: H = None
        self.t: B = None
        self.x: I = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: A = None
        self.x: G = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: I = None
        self.x: B = None
        self.y: A = None
        self.z: H = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.o: J = None
        self.p: H = None
        self.t: B = None
        self.x: I = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: A = None
        self.x: G = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: I = None
        self.x: B = None
        self.y: A = None
        self.z: H = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

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

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