class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: C = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.z: C = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: I = None
        self.r: I = None
        self.y: J = None
        self.x: G = None
        self.q: A = None
        self.z: B = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.x: F = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.q: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.z: C = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: I = None
        self.r: I = None
        self.y: J = None
        self.x: G = None
        self.q: A = None
        self.z: B = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.x: F = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.q: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

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