class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: E = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.p: E = None
        self.v: B = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.r: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.p: E = None
        self.v: B = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.r: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

l.s = i
l.z = b
l.x = a
j.s = h
j.t = h
j.x = i
i.w = a
i.q = b
i.p = b
i.v = j
i.t = l
i.z = l
h.p = j
h.y = i
h.t = b
h.r = l
b.y = i
b.x = j
b.z = l
a.q = b
n.x = a
n.u = a
n.r = l
n.q = h
d.p = l
assert n.r.s.v.x.v.txt == "j"