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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.v: G = None
        self.p: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: J = None
        self.u: H = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.v: G = None
        self.p: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: J = None
        self.u: H = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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