class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.q: E = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.z: A = None
        self.q: H = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.q: E = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.z: A = None
        self.q: H = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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