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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: G = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: D = None
        self.w: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: H = None
        self.q: D = None
        self.o: J = None
        self.v: C = None
        self.p: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: G = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: D = None
        self.w: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: H = None
        self.q: D = None
        self.o: J = None
        self.v: C = None
        self.p: J = None
        self.txt = txt

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

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

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