class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.r: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.t: B = None
        self.w: C = None
        self.v: G = None
        self.z: B = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.r: E = None
        self.u: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

d = A("d")
g = B("g")
l = C("l")
n = D("n")
e = E("e")
f = F("f")
b = G("b")
j = H("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.t: B = None
        self.w: C = None
        self.v: G = None
        self.z: B = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.r: E = None
        self.u: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

d = A("d")
g = B("g")
l = C("l")
n = D("n")
e = E("e")
f = F("f")
b = G("b")
j = H("j")

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