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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.t: A = None
        self.u: H = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.t: A = None
        self.u: H = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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