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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: D = None
        self.y: I = None
        self.q: B = None
        self.w: H = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.t: G = None
        self.x: B = None
        self.w: I = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.z: B = None
        self.w: B = None
        self.t: A = None
        self.u: C = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: D = None
        self.y: I = None
        self.q: B = None
        self.w: H = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.t: G = None
        self.x: B = None
        self.w: I = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.z: B = None
        self.w: B = None
        self.t: A = None
        self.u: C = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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