class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.s: D = None
        self.z: B = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.p: F = None
        self.o: I = None
        self.q: G = None
        self.v: G = None
        self.x: F = None
        self.r: C = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: G = None
        self.v: F = None
        self.o: A = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: C = None
        self.x: J = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: G = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.p: F = None
        self.o: I = None
        self.q: G = None
        self.v: G = None
        self.x: F = None
        self.r: C = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: G = None
        self.v: F = None
        self.o: A = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: C = None
        self.x: J = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: G = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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

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