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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.q: B = None
        self.s: G = None
        self.y: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.x: A = None
        self.p: A = None
        self.y: F = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.w: E = None
        self.v: A = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.o: E = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.q: B = None
        self.s: G = None
        self.y: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.x: A = None
        self.p: A = None
        self.y: F = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.w: E = None
        self.v: A = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.o: E = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

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

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