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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: B = None
        self.s: D = None
        self.y: G = None
        self.w: F = None
        self.x: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: B = None
        self.s: D = None
        self.y: G = None
        self.w: F = None
        self.x: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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