class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: J = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: H = None
        self.z: C = None
        self.p: J = None
        self.r: A = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: J = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: H = None
        self.z: C = None
        self.p: J = None
        self.r: A = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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