class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.z: H = None
        self.p: C = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.v: I = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: D = None
        self.s: B = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.r: I = None
        self.u: G = None
        self.y: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.z: H = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.v: I = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: D = None
        self.s: B = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.r: I = None
        self.u: G = None
        self.y: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.z: H = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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