class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
d = C("d")
k = D("k")
n = E("n")
g = F("g")
l = G("l")
a = H("a")
b = E("b")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
d = C("d")
k = D("k")
n = E("n")
g = F("g")
l = G("l")
a = H("a")
b = E("b")

e.o = g
c.v = d
c.x = d
c.p = d
c.t = g
c.u = g
c.o = k
c.s = n
c.q = n
d.o = c
k.s = c
k.v = c
k.x = d
k.z = l
k.u = l
k.r = l
n.s = l
g.x = n
g.s = k
g.q = c
g.p = l
l.r = k
l.s = k
l.t = b
a.o = g
a.q = g
a.t = e
a.p = l
a.y = k
a.z = d
a.w = d
b.s = l
assert k.x.o.o.x.o.x.o.t.txt == "g"