class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.z: B = None
        self.r: C = None
        self.y: C = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: C = None
        self.y: F = None
        self.z: H = None
        self.s: E = None
        self.q: F = None
        self.p: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

l = A("l")
a = B("a")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
i = G("i")
f = H("f")
k = F("k")

l.p = a
l.x = a
l.v = n
l.o = k
a.u = f
a.o = k
a.x = n
a.y = l
n.s = h
c.v = k
c.u = l
c.s = l
c.z = a
c.r = n
c.y = n
c.q = f
j.v = f
j.o = f
j.q = i
j.p = n
j.s = c
h.x = k
h.y = k
h.q = k
h.w = n
h.z = f
h.s = j
h.r = j
h.p = c
i.v = a
i.w = h
i.s = j
i.r = j
f.v = n
f.u = n
f.r = n
f.x = a
f.y = i
f.t = i
f.p = c
k.x = h
k.y = h
k.q = h
k.w = n
k.z = f
k.s = j
k.r = j
k.p = c
assert f.y.w.q.z.x.x.s.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.z: B = None
        self.r: C = None
        self.y: C = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: C = None
        self.y: F = None
        self.z: H = None
        self.s: E = None
        self.q: F = None
        self.p: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

l = A("l")
a = B("a")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
i = G("i")
f = H("f")
k = F("k")

l.p = a
l.x = a
l.v = n
l.o = k
a.u = f
a.o = k
a.x = n
a.y = l
n.s = h
c.v = k
c.u = l
c.s = l
c.z = a
c.r = n
c.y = n
c.q = f
j.v = f
j.o = f
j.q = i
j.p = n
j.s = c
h.x = k
h.y = k
h.q = k
h.w = n
h.z = f
h.s = j
h.r = j
h.p = c
i.v = a
i.w = h
i.s = j
i.r = j
f.v = n
f.u = n
f.r = n
f.x = a
f.y = i
f.t = i
f.p = c
k.x = h
k.y = h
k.q = h
k.w = n
k.z = f
k.s = j
k.r = j
k.p = c
assert f.y.w.q.z.x.x.s.r.v.txt == "f"