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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: H = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.z: G = None
        self.o: C = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: F = None
        self.t: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.u: F = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: I = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: H = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.z: G = None
        self.o: C = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: F = None
        self.t: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.u: F = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: I = None
        self.s: C = None
        self.txt = txt

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

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