class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.r: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: G = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: I = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

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

k.y = f
k.z = j
k.r = d
k.x = m
a.z = k
a.q = k
a.v = n
j.z = m
j.q = m
j.p = k
j.v = k
j.t = c
j.u = c
j.y = n
f.x = n
f.p = m
f.z = a
f.r = k
n.s = g
n.y = g
n.v = k
h.s = g
h.t = n
h.y = d
h.r = c
h.q = a
h.w = f
h.v = k
m.u = n
m.x = g
m.p = j
m.q = j
d.u = j
g.r = m
g.y = n
g.x = j
c.s = g
c.t = n
c.y = d
c.r = h
c.q = a
c.w = f
c.v = k
assert a.z.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.r: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: G = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: I = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

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

k.y = f
k.z = j
k.r = d
k.x = m
a.z = k
a.q = k
a.v = n
j.z = m
j.q = m
j.p = k
j.v = k
j.t = c
j.u = c
j.y = n
f.x = n
f.p = m
f.z = a
f.r = k
n.s = g
n.y = g
n.v = k
h.s = g
h.t = n
h.y = d
h.r = c
h.q = a
h.w = f
h.v = k
m.u = n
m.x = g
m.p = j
m.q = j
d.u = j
g.r = m
g.y = n
g.x = j
c.s = g
c.t = n
c.y = d
c.r = h
c.q = a
c.w = f
c.v = k
assert a.z.x.u.txt == "n"