class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: I = None
        self.w: C = None
        self.r: D = None
        self.y: F = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.s: I = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.z: F = None
        self.r: H = None
        self.o: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.y: F = None
        self.p: J = None
        self.x: F = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.txt = txt

l = A("l")
c = B("c")
d = C("d")
a = D("a")
k = E("k")
b = F("b")
g = G("g")
m = H("m")
n = I("n")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.s: I = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.z: F = None
        self.r: H = None
        self.o: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.y: F = None
        self.p: J = None
        self.x: F = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.txt = txt

l = A("l")
c = B("c")
d = C("d")
a = D("a")
k = E("k")
b = F("b")
g = G("g")
m = H("m")
n = I("n")
j = J("j")

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