class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.r: I = None
        self.x: D = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.v: G = None
        self.s: G = None
        self.y: F = None
        self.o: I = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: H = None
        self.r: H = None
        self.z: E = None
        self.q: C = None
        self.o: A = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.r: I = None
        self.x: D = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.v: G = None
        self.s: G = None
        self.y: F = None
        self.o: I = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: H = None
        self.r: H = None
        self.z: E = None
        self.q: C = None
        self.o: A = None
        self.v: B = None
        self.p: D = None
        self.txt = txt

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

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

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