class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.p: C = None
        self.t: I = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.r: I = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.y: D = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.r: I = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.y: D = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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