class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.txt = txt

j = A("j")
h = B("h")
l = C("l")
f = D("f")
k = E("k")
a = F("a")
e = G("e")
c = H("c")

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.txt = txt

j = A("j")
h = B("h")
l = C("l")
f = D("f")
k = E("k")
a = F("a")
e = G("e")
c = H("c")

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