class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.p: E = None
        self.w: F = None
        self.t: C = None
        self.z: B = None
        self.s: G = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.p: A = None
        self.z: E = None
        self.t: G = None
        self.o: F = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.y: A = None
        self.s: G = None
        self.r: G = None
        self.t: A = None
        self.z: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.p: A = None
        self.z: E = None
        self.t: G = None
        self.o: F = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.y: A = None
        self.s: G = None
        self.r: G = None
        self.t: A = None
        self.z: D = None
        self.p: I = None
        self.txt = txt

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

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

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