class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.x: A = None
        self.v: F = None
        self.q: B = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

c = A("c")
h = B("h")
f = C("f")
d = D("d")
e = E("e")
g = F("g")
i = G("i")
m = A("m")
j = G("j")
n = E("n")

c.o = n
c.t = f
h.t = d
f.s = c
f.y = m
d.z = j
d.q = j
e.x = d
e.w = j
g.x = f
g.y = f
g.o = f
g.r = c
g.s = h
g.u = e
i.o = n
i.u = h
i.q = h
i.x = m
i.v = g
i.s = g
i.z = f
m.o = e
m.t = f
j.o = e
j.u = h
j.q = h
j.x = m
j.v = g
j.s = g
j.z = f
n.x = d
n.w = j
assert m.o.w.x.t.y.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.x: A = None
        self.v: F = None
        self.q: B = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

c = A("c")
h = B("h")
f = C("f")
d = D("d")
e = E("e")
g = F("g")
i = G("i")
m = A("m")
j = G("j")
n = E("n")

c.o = n
c.t = f
h.t = d
f.s = c
f.y = m
d.z = j
d.q = j
e.x = d
e.w = j
g.x = f
g.y = f
g.o = f
g.r = c
g.s = h
g.u = e
i.o = n
i.u = h
i.q = h
i.x = m
i.v = g
i.s = g
i.z = f
m.o = e
m.t = f
j.o = e
j.u = h
j.q = h
j.x = m
j.v = g
j.s = g
j.z = f
n.x = d
n.w = j
assert m.o.w.x.t.y.t.s.txt == "c"