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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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