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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.s: J = None
        self.x: I = None
        self.o: H = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.v: C = None
        self.x: A = None
        self.p: F = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: I = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.s: J = None
        self.x: I = None
        self.o: H = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.v: C = None
        self.x: A = None
        self.p: F = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: I = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

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