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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.z: G = None
        self.u: H = None
        self.r: C = None
        self.y: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: H = None
        self.s: E = None
        self.x: D = None
        self.y: C = None
        self.u: E = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
b = C("b")
l = D("l")
h = E("h")
j = F("j")
g = G("g")
i = H("i")
f = I("f")
k = J("k")

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.z: G = None
        self.u: H = None
        self.r: C = None
        self.y: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: H = None
        self.s: E = None
        self.x: D = None
        self.y: C = None
        self.u: E = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
b = C("b")
l = D("l")
h = E("h")
j = F("j")
g = G("g")
i = H("i")
f = I("f")
k = J("k")

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