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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: G = None
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: G = None
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

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

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

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