class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: F = None
        self.s: B = None
        self.w: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: H = None
        self.v: G = None
        self.o: B = None
        self.u: G = None
        self.s: E = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: H = None
        self.v: G = None
        self.o: B = None
        self.u: G = None
        self.s: E = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: B = None
        self.txt = txt

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

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