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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.v: E = None
        self.u: A = None
        self.w: E = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.w: H = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.v: E = None
        self.u: A = None
        self.w: E = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.w: H = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

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