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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: G = None
        self.r: A = None
        self.p: B = None
        self.y: E = None
        self.z: C = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: G = None
        self.r: A = None
        self.p: B = None
        self.y: E = None
        self.z: C = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

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

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