class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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