class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.o: B = None
        self.u: J = None
        self.v: I = None
        self.y: E = None
        self.t: I = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.v: E = None
        self.w: E = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: I = None
        self.r: F = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.w: E = None
        self.z: A = None
        self.t: I = None
        self.q: J = None
        self.u: J = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.z: E = None
        self.u: G = None
        self.w: E = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: C = None
        self.u: F = None
        self.v: I = None
        self.q: H = None
        self.r: B = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.v: E = None
        self.w: E = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: I = None
        self.r: F = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.w: E = None
        self.z: A = None
        self.t: I = None
        self.q: J = None
        self.u: J = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.z: E = None
        self.u: G = None
        self.w: E = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: C = None
        self.u: F = None
        self.v: I = None
        self.q: H = None
        self.r: B = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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