class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: E = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.x: E = None
        self.o: B = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

g = A("g")
n = B("n")
j = C("j")
b = D("b")
e = E("e")
c = F("c")
a = G("a")
m = H("m")
f = B("f")
h = G("h")

g.v = a
g.x = b
g.s = e
n.u = c
n.t = m
n.s = m
n.v = g
n.o = j
j.p = e
j.q = e
j.o = m
j.u = f
b.y = j
b.x = j
b.o = j
b.z = e
b.v = m
b.q = m
b.s = g
e.t = m
e.z = j
c.y = f
c.s = g
c.z = g
c.x = e
c.o = n
c.t = j
a.v = h
a.u = g
m.q = b
f.u = c
f.t = m
f.s = m
f.v = g
f.o = j
h.v = a
h.u = g
assert e.z.p.t.q.o.u.t.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: E = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.x: E = None
        self.o: B = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

g = A("g")
n = B("n")
j = C("j")
b = D("b")
e = E("e")
c = F("c")
a = G("a")
m = H("m")
f = B("f")
h = G("h")

g.v = a
g.x = b
g.s = e
n.u = c
n.t = m
n.s = m
n.v = g
n.o = j
j.p = e
j.q = e
j.o = m
j.u = f
b.y = j
b.x = j
b.o = j
b.z = e
b.v = m
b.q = m
b.s = g
e.t = m
e.z = j
c.y = f
c.s = g
c.z = g
c.x = e
c.o = n
c.t = j
a.v = h
a.u = g
m.q = b
f.u = c
f.t = m
f.s = m
f.v = g
f.o = j
h.v = a
h.u = g
assert e.z.p.t.q.o.u.t.q.z.txt == "e"