class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: B = None
        self.o: E = None
        self.r: G = None
        self.u: F = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.p: A = None
        self.y: A = None
        self.x: G = None
        self.u: I = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.s: G = None
        self.v: C = None
        self.z: D = None
        self.p: B = None
        self.y: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.p: A = None
        self.s: A = None
        self.t: H = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: I = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.p: A = None
        self.y: A = None
        self.x: G = None
        self.u: I = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.s: G = None
        self.v: C = None
        self.z: D = None
        self.p: B = None
        self.y: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.p: A = None
        self.s: A = None
        self.t: H = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: I = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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