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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: H = None
        self.x: F = None
        self.q: C = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

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

a = A("a")
d = B("d")
e = C("e")
h = D("h")
l = E("l")
m = F("m")
j = G("j")
i = H("i")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: H = None
        self.x: F = None
        self.q: C = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

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

a = A("a")
d = B("d")
e = C("e")
h = D("h")
l = E("l")
m = F("m")
j = G("j")
i = H("i")
k = F("k")

a.q = l
d.v = l
d.s = i
d.x = m
d.q = e
d.w = j
e.v = h
e.s = a
h.y = l
h.z = l
l.z = h
l.o = e
l.w = j
m.z = h
m.v = j
m.y = j
j.u = h
j.z = l
j.r = d
i.r = d
i.w = e
i.v = j
i.u = a
i.o = h
k.z = h
k.v = j
k.y = j
assert d.s.r.w.u.z.z.z.txt == "l"