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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.q: A = None
        self.s: E = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.q: A = None
        self.x: H = None
        self.t: F = None
        self.s: H = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.q: A = None
        self.s: E = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.q: A = None
        self.x: H = None
        self.t: F = None
        self.s: H = None
        self.y: D = None
        self.txt = txt

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

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