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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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