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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.x: E = None
        self.u: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.q: G = None
        self.p: I = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.x: E = None
        self.u: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.q: G = None
        self.p: I = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

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

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

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