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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.v: A = None
        self.w: E = None
        self.p: E = None
        self.q: F = None
        self.z: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.v: A = None
        self.w: E = None
        self.p: E = None
        self.q: F = None
        self.z: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

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