class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: F = None
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

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

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