class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.r: E = None
        self.u: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.r: E = None
        self.u: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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