class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.p: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.v: E = None
        self.s: F = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.z: G = None
        self.u: C = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.txt = txt

a = A("a")
k = B("k")
n = C("n")
l = D("l")
h = E("h")
b = F("b")
m = G("m")

a.s = l
a.w = b
a.p = b
a.y = b
k.t = h
k.v = h
k.z = a
k.s = b
k.r = b
k.p = l
n.w = l
n.z = a
n.r = k
l.v = a
l.o = n
l.t = h
h.x = l
h.v = b
h.q = b
b.w = k
b.t = k
b.z = m
b.u = n
b.v = n
b.o = h
m.v = a
m.z = k
assert a.s.t.v.z.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.p: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.v: E = None
        self.s: F = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.z: G = None
        self.u: C = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.txt = txt

a = A("a")
k = B("k")
n = C("n")
l = D("l")
h = E("h")
b = F("b")
m = G("m")

a.s = l
a.w = b
a.p = b
a.y = b
k.t = h
k.v = h
k.z = a
k.s = b
k.r = b
k.p = l
n.w = l
n.z = a
n.r = k
l.v = a
l.o = n
l.t = h
h.x = l
h.v = b
h.q = b
b.w = k
b.t = k
b.z = m
b.u = n
b.v = n
b.o = h
m.v = a
m.z = k
assert a.s.t.v.z.v.s.txt == "l"