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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.y: E = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.y: E = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

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

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

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