class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: J = None
        self.z: H = None
        self.x: J = None
        self.r: F = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: J = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.u: C = None
        self.w: I = None
        self.y: B = None
        self.t: I = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: J = None
        self.z: H = None
        self.x: J = None
        self.r: F = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: J = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.u: C = None
        self.w: I = None
        self.y: B = None
        self.t: I = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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