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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.w: A = None
        self.r: H = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: A = None
        self.z: F = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.w: A = None
        self.r: H = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: A = None
        self.z: F = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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