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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.p: E = None
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: C = None
        self.s: B = None
        self.q: B = None
        self.v: D = None
        self.r: I = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.q: D = None
        self.o: I = None
        self.u: I = None
        self.y: C = None
        self.z: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.s: D = None
        self.o: C = None
        self.w: F = None
        self.u: F = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: H = None
        self.u: D = None
        self.p: F = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.p: E = None
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: C = None
        self.s: B = None
        self.q: B = None
        self.v: D = None
        self.r: I = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.q: D = None
        self.o: I = None
        self.u: I = None
        self.y: C = None
        self.z: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.s: D = None
        self.o: C = None
        self.w: F = None
        self.u: F = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: H = None
        self.u: D = None
        self.p: F = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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