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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: J = None
        self.r: G = None
        self.w: E = None
        self.z: A = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: B = None
        self.q: I = None
        self.p: A = None
        self.s: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: J = None
        self.r: G = None
        self.w: E = None
        self.z: A = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: B = None
        self.q: I = None
        self.p: A = None
        self.s: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: D = None
        self.txt = txt

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

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