class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

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

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

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