class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: B = None
        self.y: C = None
        self.w: G = None
        self.x: E = None
        self.q: C = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

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