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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.u: B = None
        self.x: B = None
        self.r: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: G = None
        self.u: F = None
        self.t: F = None
        self.s: D = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
l = B("l")
i = C("i")
d = D("d")
h = E("h")
k = F("k")
m = G("m")
j = B("j")
n = E("n")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.u: B = None
        self.x: B = None
        self.r: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: G = None
        self.u: F = None
        self.t: F = None
        self.s: D = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
l = B("l")
i = C("i")
d = D("d")
h = E("h")
k = F("k")
m = G("m")
j = B("j")
n = E("n")

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