class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.w: B = None
        self.r: A = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: G = None
        self.y: H = None
        self.s: G = None
        self.u: I = None
        self.r: E = None
        self.v: B = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: C = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.r: A = None
        self.o: B = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.w: B = None
        self.r: A = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: G = None
        self.y: H = None
        self.s: G = None
        self.u: I = None
        self.r: E = None
        self.v: B = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: C = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.r: A = None
        self.o: B = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

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

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