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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.z: D = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: I = None
        self.x: J = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.s: F = None
        self.v: D = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.z: D = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: I = None
        self.x: J = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.s: F = None
        self.v: D = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

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

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

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