class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: H = None
        self.r: D = None
        self.w: C = None
        self.v: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.t: B = None
        self.u: F = None
        self.y: B = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.t: B = None
        self.u: F = None
        self.y: B = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: H = None
        self.txt = txt

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

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

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