class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: B = None
        self.y: B = None
        self.z: H = None
        self.w: H = None
        self.q: E = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.w: C = None
        self.z: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: D = None
        self.r: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.s: G = None
        self.w: C = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: G = None
        self.u: B = None
        self.w: G = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.w: C = None
        self.z: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: D = None
        self.r: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.s: G = None
        self.w: C = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: G = None
        self.u: B = None
        self.w: G = None
        self.y: A = None
        self.txt = txt

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

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