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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.t: C = None
        self.o: D = None
        self.y: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.t: C = None
        self.o: D = None
        self.y: I = None
        self.txt = txt

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

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

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