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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.y: G = None
        self.v: B = None
        self.q: G = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

l = A("l")
n = B("n")
h = C("h")
i = D("i")
g = E("g")
e = F("e")
f = G("f")
k = H("k")
m = B("m")
a = B("a")

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.y: G = None
        self.v: B = None
        self.q: G = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

l = A("l")
n = B("n")
h = C("h")
i = D("i")
g = E("g")
e = F("e")
f = G("f")
k = H("k")
m = B("m")
a = B("a")

l.o = e
l.z = f
n.v = f
h.y = g
h.r = i
i.s = a
i.r = l
i.p = l
i.y = g
i.x = e
g.t = e
g.p = e
g.y = f
g.q = f
g.v = n
g.x = k
e.q = l
f.o = g
f.t = i
f.q = k
f.y = k
f.r = m
f.z = l
k.o = f
k.t = f
k.u = i
k.y = l
m.v = f
a.v = f
assert g.x.y.z.t.p.o.q.o.q.txt == "l"