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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.x: F = None
        self.r: F = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: A = None
        self.y: B = None
        self.v: E = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.p: F = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.x: F = None
        self.r: F = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: A = None
        self.y: B = None
        self.v: E = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.p: F = None
        self.w: C = None
        self.txt = txt

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

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