class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: G = None
        self.r: G = None
        self.p: C = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.r: H = None
        self.o: H = None
        self.z: B = None
        self.v: H = None
        self.p: H = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.u: D = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.w: E = None
        self.r: B = None
        self.p: H = None
        self.o: D = None
        self.q: I = None
        self.y: B = None
        self.s: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: F = None
        self.y: C = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.r: H = None
        self.o: H = None
        self.z: B = None
        self.v: H = None
        self.p: H = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.u: D = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.w: E = None
        self.r: B = None
        self.p: H = None
        self.o: D = None
        self.q: I = None
        self.y: B = None
        self.s: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: F = None
        self.y: C = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

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