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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: H = None
        self.t: D = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.r: G = None
        self.y: E = None
        self.s: F = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.s: B = None
        self.o: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

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

a = A("a")
i = B("i")
b = C("b")
e = D("e")
n = E("n")
g = F("g")
m = G("m")
c = H("c")
d = C("d")
f = A("f")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: H = None
        self.t: D = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.r: G = None
        self.y: E = None
        self.s: F = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.s: B = None
        self.o: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

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

a = A("a")
i = B("i")
b = C("b")
e = D("e")
n = E("n")
g = F("g")
m = G("m")
c = H("c")
d = C("d")
f = A("f")

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