class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.w: E = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.s: A = None
        self.z: G = None
        self.o: B = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.s: A = None
        self.z: G = None
        self.o: B = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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