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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: I = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.y: I = None
        self.s: A = None
        self.w: E = None
        self.x: E = None
        self.q: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.q: E = None
        self.z: C = None
        self.r: A = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: I = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.y: I = None
        self.s: A = None
        self.w: E = None
        self.x: E = None
        self.q: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.q: E = None
        self.z: C = None
        self.r: A = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

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