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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: I = None
        self.y: B = None
        self.x: I = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.q: E = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.w: H = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.p: C = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.u: G = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: C = None
        self.u: I = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

d = A("d")
a = B("a")
k = C("k")
n = D("n")
m = E("m")
i = F("i")
f = G("f")
b = H("b")
g = I("g")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: I = None
        self.y: B = None
        self.x: I = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.q: E = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.w: H = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.p: C = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.u: G = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: C = None
        self.u: I = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

d = A("d")
a = B("a")
k = C("k")
n = D("n")
m = E("m")
i = F("i")
f = G("f")
b = H("b")
g = I("g")
j = J("j")

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