class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.x: H = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.v: A = None
        self.t: G = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.w: B = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.x: H = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.v: A = None
        self.t: G = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: F = None
        self.w: B = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

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

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