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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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