class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: H = None
        self.q: C = None
        self.w: C = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.x: C = None
        self.o: D = None
        self.u: G = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.x: C = None
        self.o: D = None
        self.u: G = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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