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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.q: A = None
        self.y: A = None
        self.u: A = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

n.s = l
n.t = l
n.x = l
n.v = e
n.u = a
n.z = k
h.v = n
h.t = a
h.y = a
h.o = k
h.w = b
a.w = k
a.o = d
a.x = h
d.u = f
d.p = f
d.t = h
d.v = k
k.y = e
k.x = h
k.r = n
k.z = n
k.v = d
k.p = g
f.u = n
l.x = d
l.r = d
l.p = a
l.o = g
l.u = k
b.x = d
g.s = h
g.w = b
g.q = n
g.y = n
g.u = n
g.o = n
g.v = k
e.s = h
e.w = b
e.q = n
e.y = n
e.u = n
e.o = n
e.v = k
assert b.x.t.t.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.t: G = None
        self.u: C = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.q: A = None
        self.y: A = None
        self.u: A = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

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