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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.x: C = None
        self.y: H = None
        self.v: A = None
        self.p: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: I = None
        self.u: H = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: H = None
        self.x: A = None
        self.v: B = None
        self.o: A = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.x: C = None
        self.y: H = None
        self.v: A = None
        self.p: B = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: I = None
        self.u: H = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: H = None
        self.x: A = None
        self.v: B = None
        self.o: A = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

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