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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.o: H = None
        self.s: E = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.w: H = None
        self.t: D = None
        self.u: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.v: C = None
        self.q: B = None
        self.p: H = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: F = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.o: H = None
        self.s: E = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.w: H = None
        self.t: D = None
        self.u: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.v: C = None
        self.q: B = None
        self.p: H = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: F = None
        self.w: D = None
        self.txt = txt

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

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