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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.u: B = None
        self.s: C = None
        self.p: F = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.u: B = None
        self.s: C = None
        self.p: F = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

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

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