class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.w: G = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.q: B = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.o: C = None
        self.z: D = None
        self.x: E = None
        self.v: E = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.v: H = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: D = None
        self.txt = txt

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

i = A("i")
d = B("d")
e = C("e")
l = D("l")
b = E("b")
a = F("a")
n = G("n")
j = H("j")
c = I("c")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.w: G = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.q: B = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.o: C = None
        self.z: D = None
        self.x: E = None
        self.v: E = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.v: H = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: D = None
        self.txt = txt

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

i = A("i")
d = B("d")
e = C("e")
l = D("l")
b = E("b")
a = F("a")
n = G("n")
j = H("j")
c = I("c")

i.z = e
d.p = b
d.u = j
d.w = n
d.q = i
d.v = e
e.o = i
e.x = d
e.q = d
e.v = n
e.p = n
l.t = b
l.x = b
l.v = b
l.u = b
l.z = n
l.q = i
l.r = i
l.o = c
l.s = a
b.r = a
b.o = d
b.w = n
a.u = i
a.t = b
a.x = b
a.v = b
a.o = e
a.w = e
a.z = l
a.r = l
n.s = c
n.r = c
n.w = d
n.v = j
n.p = b
j.w = a
j.x = l
c.u = d
c.z = d
c.y = i
c.o = i
c.s = i
c.q = b
c.x = j
assert i.z.x.u.w.txt == "a"