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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: D = None
        self.y: G = None
        self.o: D = None
        self.r: A = None
        self.t: I = None
        self.p: F = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.o: G = None
        self.y: C = None
        self.t: C = None
        self.x: G = None
        self.q: A = None
        self.s: A = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: D = None
        self.y: G = None
        self.o: D = None
        self.r: A = None
        self.t: I = None
        self.p: F = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.o: G = None
        self.y: C = None
        self.t: C = None
        self.x: G = None
        self.q: A = None
        self.s: A = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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