class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: D = None
        self.u: F = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: C = None
        self.x: F = None
        self.q: C = None
        self.s: F = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

e = A("e")
m = B("m")
a = C("a")
h = D("h")
k = E("k")
j = F("j")
b = G("b")
l = H("l")
g = F("g")

e.w = l
e.v = h
e.u = g
e.x = j
e.o = a
m.v = h
m.t = h
m.x = l
m.q = l
m.u = a
m.p = b
m.s = k
a.q = m
a.r = m
a.o = b
a.p = k
h.q = e
k.o = l
k.p = e
k.q = a
j.z = b
j.u = b
j.r = a
j.q = a
j.x = g
j.s = g
j.v = e
b.u = a
b.r = k
b.z = e
l.q = e
l.v = m
g.z = b
g.u = b
g.r = a
g.q = a
g.x = j
g.s = j
g.v = e
assert h.q.o.p.o.v.u.p.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: D = None
        self.u: F = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: C = None
        self.x: F = None
        self.q: C = None
        self.s: F = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

e = A("e")
m = B("m")
a = C("a")
h = D("h")
k = E("k")
j = F("j")
b = G("b")
l = H("l")
g = F("g")

e.w = l
e.v = h
e.u = g
e.x = j
e.o = a
m.v = h
m.t = h
m.x = l
m.q = l
m.u = a
m.p = b
m.s = k
a.q = m
a.r = m
a.o = b
a.p = k
h.q = e
k.o = l
k.p = e
k.q = a
j.z = b
j.u = b
j.r = a
j.q = a
j.x = g
j.s = g
j.v = e
b.u = a
b.r = k
b.z = e
l.q = e
l.v = m
g.z = b
g.u = b
g.r = a
g.q = a
g.x = j
g.s = j
g.v = e
assert h.q.o.p.o.v.u.p.q.o.txt == "b"