class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: I = None
        self.p: I = None
        self.o: F = None
        self.z: A = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: C = None
        self.x: E = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: I = None
        self.p: I = None
        self.o: F = None
        self.z: A = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: C = None
        self.x: E = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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