class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.v: D = None
        self.t: D = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.w: J = None
        self.p: G = None
        self.o: F = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.v: F = None
        self.z: D = None
        self.r: C = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.o: D = None
        self.r: D = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.w: J = None
        self.p: G = None
        self.o: F = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.v: F = None
        self.z: D = None
        self.r: C = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.o: D = None
        self.r: D = None
        self.s: F = None
        self.txt = txt

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

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