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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: I = None
        self.r: D = None
        self.p: J = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: J = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: I = None
        self.r: D = None
        self.p: J = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: J = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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