class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: E = None
        self.p: H = None
        self.q: B = None
        self.u: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: A = None
        self.r: I = None
        self.v: D = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: F = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.v: G = None
        self.w: E = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: A = None
        self.r: I = None
        self.v: D = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: F = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.v: G = None
        self.w: E = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.txt = txt

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

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