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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: H = None
        self.o: A = None
        self.z: H = None
        self.y: E = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.o: A = None
        self.y: C = None
        self.v: G = None
        self.u: C = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.txt = txt

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

g = A("g")
i = B("i")
n = C("n")
d = D("d")
k = E("k")
b = F("b")
h = G("h")
a = H("a")
l = E("l")

g.z = n
g.t = k
g.q = b
g.v = d
g.y = d
g.u = i
g.o = i
g.x = h
i.w = l
n.r = i
n.x = a
n.z = a
n.o = g
n.y = k
n.u = d
n.p = h
d.q = i
k.q = l
k.x = d
k.r = d
k.o = g
k.y = n
k.u = n
k.w = n
k.v = h
b.s = n
b.o = g
b.q = a
b.t = h
h.y = i
h.w = b
a.z = k
a.q = g
a.t = i
a.w = i
a.u = d
a.y = n
l.q = k
l.x = d
l.r = d
l.o = g
l.y = n
l.u = n
l.w = n
l.v = h
assert i.w.q.o.z.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.q: F = None
        self.v: D = None
        self.u: B = None
        self.o: B = None
        self.x: G = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: H = None
        self.o: A = None
        self.z: H = None
        self.y: E = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.o: A = None
        self.y: C = None
        self.v: G = None
        self.u: C = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.txt = txt

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

g = A("g")
i = B("i")
n = C("n")
d = D("d")
k = E("k")
b = F("b")
h = G("h")
a = H("a")
l = E("l")

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