class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: I = None
        self.t: F = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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