class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.r: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.s: B = None
        self.o: E = None
        self.txt = txt

k = A("k")
h = B("h")
d = C("d")
b = D("b")
c = E("c")
l = F("l")
i = G("i")
j = H("j")

k.z = l
k.t = l
k.q = i
k.r = c
h.s = j
h.x = i
h.v = i
h.p = b
h.w = b
h.z = b
h.t = k
d.v = l
b.q = j
b.o = c
c.x = i
l.u = c
l.x = c
l.q = h
l.z = b
i.p = d
i.s = c
i.t = k
i.w = h
j.z = d
j.u = d
j.s = h
j.o = c
assert i.s.x.p.v.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.r: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.s: B = None
        self.o: E = None
        self.txt = txt

k = A("k")
h = B("h")
d = C("d")
b = D("b")
c = E("c")
l = F("l")
i = G("i")
j = H("j")

k.z = l
k.t = l
k.q = i
k.r = c
h.s = j
h.x = i
h.v = i
h.p = b
h.w = b
h.z = b
h.t = k
d.v = l
b.q = j
b.o = c
c.x = i
l.u = c
l.x = c
l.q = h
l.z = b
i.p = d
i.s = c
i.t = k
i.w = h
j.z = d
j.u = d
j.s = h
j.o = c
assert i.s.x.p.v.q.w.txt == "b"