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

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

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

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

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

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

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

c = A("c")
k = B("k")
i = C("i")
f = D("f")
d = E("d")
m = F("m")
e = G("e")
b = E("b")

c.o = f
c.w = k
c.z = m
k.x = m
k.r = i
i.q = f
i.y = f
i.z = m
i.v = m
i.x = d
f.z = k
d.o = i
d.p = f
d.v = m
d.y = m
d.u = k
d.t = e
m.s = k
m.t = d
m.w = i
m.x = i
e.y = m
e.v = i
b.o = i
b.p = f
b.v = m
b.y = m
b.u = k
b.t = e
assert e.v.x.t.v.v.s.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

c = A("c")
k = B("k")
i = C("i")
f = D("f")
d = E("d")
m = F("m")
e = G("e")
b = E("b")

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