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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.x: I = None
        self.w: H = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

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

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

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

d.s = g
d.v = c
e.s = k
i.o = b
i.s = d
i.x = h
i.w = c
i.r = c
i.q = j
k.r = c
b.y = d
b.s = i
j.p = i
j.w = e
j.s = b
j.t = m
j.x = d
g.y = e
g.o = k
g.s = c
g.t = i
c.r = b
h.s = i
h.p = c
h.q = m
h.x = k
h.v = d
m.p = i
m.w = e
m.s = b
m.t = j
m.x = d
assert i.o.y.v.r.s.s.s.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.x: I = None
        self.w: H = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

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

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

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

d.s = g
d.v = c
e.s = k
i.o = b
i.s = d
i.x = h
i.w = c
i.r = c
i.q = j
k.r = c
b.y = d
b.s = i
j.p = i
j.w = e
j.s = b
j.t = m
j.x = d
g.y = e
g.o = k
g.s = c
g.t = i
c.r = b
h.s = i
h.p = c
h.q = m
h.x = k
h.v = d
m.p = i
m.w = e
m.s = b
m.t = j
m.x = d
assert i.o.y.v.r.s.s.s.t.q.txt == "j"