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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.z: C = None
        self.q: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.z: C = None
        self.q: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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