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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: J = None
        self.x: F = None
        self.s: F = None
        self.y: E = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.u: I = None
        self.s: A = None
        self.x: B = None
        self.w: E = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.p: H = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.z: A = None
        self.v: A = None
        self.r: I = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: J = None
        self.x: F = None
        self.s: F = None
        self.y: E = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.u: I = None
        self.s: A = None
        self.x: B = None
        self.w: E = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.p: H = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.z: A = None
        self.v: A = None
        self.r: I = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

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