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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.p: F = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.w: E = None
        self.t: D = None
        self.o: H = None
        self.y: G = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.p: F = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.w: E = None
        self.t: D = None
        self.o: H = None
        self.y: G = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

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