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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: J = None
        self.z: E = None
        self.u: G = None
        self.r: E = None
        self.t: H = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.x: I = None
        self.o: H = None
        self.y: D = None
        self.z: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: J = None
        self.z: I = None
        self.y: I = None
        self.v: I = None
        self.w: B = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: C = None
        self.v: A = None
        self.t: C = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: J = None
        self.z: E = None
        self.u: G = None
        self.r: E = None
        self.t: H = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.x: I = None
        self.o: H = None
        self.y: D = None
        self.z: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: J = None
        self.z: I = None
        self.y: I = None
        self.v: I = None
        self.w: B = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: C = None
        self.v: A = None
        self.t: C = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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