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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: E = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: E = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

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

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