class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.x: E = None
        self.p: E = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.w: E = None
        self.t: B = None
        self.y: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.p: C = None
        self.w: A = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
j = C("j")
m = D("m")
b = E("b")
k = F("k")
a = G("a")
e = A("e")
i = G("i")
f = F("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.x: E = None
        self.p: E = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.w: E = None
        self.t: B = None
        self.y: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.p: C = None
        self.w: A = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
j = C("j")
m = D("m")
b = E("b")
k = F("k")
a = G("a")
e = A("e")
i = G("i")
f = F("f")

g.s = m
g.r = k
n.t = f
n.z = k
n.s = a
j.y = i
j.u = b
j.x = b
j.p = b
j.t = a
m.u = f
m.v = f
m.x = b
m.w = b
m.t = n
m.y = n
m.q = n
b.w = e
k.u = m
k.q = n
k.p = j
k.w = g
k.r = b
k.o = f
a.o = n
e.s = m
e.r = k
i.o = n
f.u = m
f.q = n
f.p = j
f.w = e
f.r = b
f.o = k
assert k.p.y.o.t.o.u.x.w.s.y.txt == "n"