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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.p: D = None
        self.z: C = None
        self.v: E = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.p: D = None
        self.z: C = None
        self.v: E = None
        self.y: H = None
        self.txt = txt

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

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