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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: H = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.y: B = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.z: C = None
        self.y: A = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

j.r = c
l.r = b
l.t = c
f.t = d
f.y = m
f.r = m
f.o = n
b.v = f
b.t = f
b.r = j
b.x = j
b.y = l
n.v = l
n.r = m
n.q = m
n.p = m
n.z = f
n.y = j
i.p = n
i.o = n
a.y = j
m.y = l
m.v = j
d.w = c
d.v = j
c.q = n
assert d.w.q.z.t.w.q.y.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: H = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.y: B = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.z: C = None
        self.y: A = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

j.r = c
l.r = b
l.t = c
f.t = d
f.y = m
f.r = m
f.o = n
b.v = f
b.t = f
b.r = j
b.x = j
b.y = l
n.v = l
n.r = m
n.q = m
n.p = m
n.z = f
n.y = j
i.p = n
i.o = n
a.y = j
m.y = l
m.v = j
d.w = c
d.v = j
c.q = n
assert d.w.q.z.t.w.q.y.r.q.txt == "n"