class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.s: F = None
        self.t: H = None
        self.o: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.s: F = None
        self.t: H = None
        self.o: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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