class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.r: F = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.p: I = None
        self.s: J = None
        self.w: F = None
        self.o: B = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.s: H = None
        self.q: I = None
        self.v: I = None
        self.y: C = None
        self.r: G = None
        self.w: C = None
        self.u: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.r: F = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.p: I = None
        self.s: J = None
        self.w: F = None
        self.o: B = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.s: H = None
        self.q: I = None
        self.v: I = None
        self.y: C = None
        self.r: G = None
        self.w: C = None
        self.u: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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