class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

m = A("m")
l = B("l")
b = C("b")
i = D("i")
k = E("k")
f = F("f")
j = G("j")

m.y = j
m.u = b
m.w = l
l.t = b
l.r = f
l.v = k
b.u = j
b.y = f
b.p = l
b.t = m
i.r = j
i.z = l
i.y = b
k.s = m
k.q = m
k.z = l
k.p = b
f.o = k
f.w = m
f.s = i
f.q = l
j.p = i
j.x = l
j.r = m
assert l.v.z.v.z.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

m = A("m")
l = B("l")
b = C("b")
i = D("i")
k = E("k")
f = F("f")
j = G("j")

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