class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.p: F = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.q: I = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.z: F = None
        self.u: E = None
        self.q: A = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.p: F = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.q: I = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.z: F = None
        self.u: E = None
        self.q: A = None
        self.t: A = None
        self.txt = txt

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

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