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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.x: H = None
        self.z: F = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.x: H = None
        self.z: F = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

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