class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: H = None
        self.x: E = None
        self.u: E = None
        self.v: F = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.t: E = None
        self.s: D = None
        self.o: A = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.p: H = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: H = None
        self.x: E = None
        self.u: E = None
        self.v: F = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.t: E = None
        self.s: D = None
        self.o: A = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.p: H = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

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

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