class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.v: D = None
        self.q: A = None
        self.t: G = None
        self.x: G = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.p: E = None
        self.o: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.y: F = None
        self.w: C = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: G = None
        self.u: D = None
        self.w: F = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.v: D = None
        self.q: A = None
        self.t: G = None
        self.x: G = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.p: E = None
        self.o: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.y: F = None
        self.w: C = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: G = None
        self.u: D = None
        self.w: F = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

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