class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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