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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.t: G = None
        self.w: A = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: I = None
        self.v: E = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

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

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

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

e = A("e")
f = B("f")
a = C("a")
k = D("k")
g = E("g")
d = F("d")
m = G("m")
b = H("b")
n = I("n")
i = G("i")

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.t: G = None
        self.w: A = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: I = None
        self.v: E = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

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

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

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

e = A("e")
f = B("f")
a = C("a")
k = D("k")
g = E("g")
d = F("d")
m = G("m")
b = H("b")
n = I("n")
i = G("i")

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