class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.q: E = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.s: F = None
        self.v: G = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

f.w = e
f.r = h
f.q = i
f.t = b
f.v = j
c.q = l
c.y = l
c.p = h
c.w = h
c.u = m
c.z = g
c.v = b
c.o = f
c.x = j
j.q = b
j.t = b
j.o = l
j.x = f
b.o = f
b.y = c
b.s = e
b.t = e
b.v = h
b.x = h
i.q = j
e.o = h
e.y = m
e.z = l
h.w = c
h.p = l
h.y = l
h.x = m
h.q = m
h.r = m
h.o = m
h.z = g
h.v = i
h.u = j
m.q = e
m.o = g
l.r = c
l.w = h
l.u = j
g.x = h
g.q = m
g.y = e
g.r = j
assert b.y.x.o.u.o.w.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.q: E = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.s: F = None
        self.v: G = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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