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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: G = None
        self.r: G = None
        self.x: B = None
        self.v: C = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: C = None
        self.p: I = None
        self.txt = txt

m = A("m")
a = B("a")
n = C("n")
l = D("l")
k = E("k")
i = F("i")
e = G("e")
g = H("g")
j = I("j")
c = J("c")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: G = None
        self.r: G = None
        self.x: B = None
        self.v: C = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: C = None
        self.p: I = None
        self.txt = txt

m = A("m")
a = B("a")
n = C("n")
l = D("l")
k = E("k")
i = F("i")
e = G("e")
g = H("g")
j = I("j")
c = J("c")

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