class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: H = None
        self.s: I = None
        self.t: B = None
        self.x: I = None
        self.z: E = None
        self.q: B = None
        self.o: C = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: B = None
        self.p: A = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.p: H = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: B = None
        self.p: A = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.p: H = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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