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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.z: I = None
        self.y: G = None
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: C = None
        self.q: I = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.z: I = None
        self.y: G = None
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: C = None
        self.q: I = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

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

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