class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.w: H = None
        self.v: F = None
        self.u: E = None
        self.x: G = None
        self.p: I = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.o: A = None
        self.q: D = None
        self.w: D = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
c = D("c")
d = E("d")
n = F("n")
m = G("m")
i = H("i")
k = I("k")

l.w = n
l.r = a
b.u = i
b.y = i
b.o = i
b.t = d
b.x = d
b.z = d
b.s = m
b.q = a
b.r = c
a.q = m
a.x = m
a.r = i
a.w = i
a.o = i
a.v = n
a.u = d
a.p = k
a.z = b
c.z = m
c.x = m
c.t = l
c.o = l
c.p = n
c.r = a
c.q = k
c.w = k
d.q = l
n.x = i
n.q = c
n.u = k
m.t = d
m.p = d
m.x = d
m.o = l
m.q = c
m.w = c
m.s = b
i.v = b
i.o = m
k.x = c
k.v = n
assert m.w.r.u.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.w: H = None
        self.v: F = None
        self.u: E = None
        self.x: G = None
        self.p: I = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.o: A = None
        self.q: D = None
        self.w: D = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
c = D("c")
d = E("d")
n = F("n")
m = G("m")
i = H("i")
k = I("k")

l.w = n
l.r = a
b.u = i
b.y = i
b.o = i
b.t = d
b.x = d
b.z = d
b.s = m
b.q = a
b.r = c
a.q = m
a.x = m
a.r = i
a.w = i
a.o = i
a.v = n
a.u = d
a.p = k
a.z = b
c.z = m
c.x = m
c.t = l
c.o = l
c.p = n
c.r = a
c.q = k
c.w = k
d.q = l
n.x = i
n.q = c
n.u = k
m.t = d
m.p = d
m.x = d
m.o = l
m.q = c
m.w = c
m.s = b
i.v = b
i.o = m
k.x = c
k.v = n
assert m.w.r.u.q.r.txt == "a"