class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.z: G = None
        self.x: F = None
        self.v: B = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.u: F = None
        self.p: G = None
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.o: D = None
        self.s: D = None
        self.q: G = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.s: D = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: A = None
        self.y: C = None
        self.w: A = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

l = A("l")
g = B("g")
j = C("j")
d = D("d")
i = E("i")
h = F("h")
m = G("m")

l.w = d
l.r = d
l.p = m
l.z = m
l.o = m
l.x = h
l.v = g
g.q = j
g.s = d
g.u = h
g.z = h
g.p = m
g.t = l
j.u = g
j.s = g
j.x = h
d.v = m
d.q = h
i.r = m
i.q = m
i.u = g
i.o = d
i.s = d
i.p = d
i.t = h
h.q = j
h.y = j
h.z = j
h.x = d
h.s = d
m.t = d
m.v = d
m.s = d
m.x = l
m.w = l
m.y = j
assert g.s.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.z: G = None
        self.x: F = None
        self.v: B = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.u: F = None
        self.p: G = None
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.o: D = None
        self.s: D = None
        self.q: G = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.s: D = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: A = None
        self.y: C = None
        self.w: A = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

l = A("l")
g = B("g")
j = C("j")
d = D("d")
i = E("i")
h = F("h")
m = G("m")

l.w = d
l.r = d
l.p = m
l.z = m
l.o = m
l.x = h
l.v = g
g.q = j
g.s = d
g.u = h
g.z = h
g.p = m
g.t = l
j.u = g
j.s = g
j.x = h
d.v = m
d.q = h
i.r = m
i.q = m
i.u = g
i.o = d
i.s = d
i.p = d
i.t = h
h.q = j
h.y = j
h.z = j
h.x = d
h.s = d
m.t = d
m.v = d
m.s = d
m.x = l
m.w = l
m.y = j
assert g.s.v.s.txt == "d"