class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.o: H = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.s: H = None
        self.r: B = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.z: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.s: H = None
        self.r: B = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.z: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

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

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