class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.t: E = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

c.o = m
c.x = j
c.y = b
j.q = a
j.y = a
j.t = k
j.x = k
j.o = k
m.p = e
m.w = i
m.t = b
b.r = j
b.u = a
b.x = i
b.v = i
b.s = i
b.o = e
k.s = c
a.s = b
a.q = b
a.p = k
a.o = i
e.y = d
e.q = c
e.r = c
e.z = i
i.o = j
i.x = k
i.y = g
i.s = m
i.p = e
d.y = e
d.q = c
d.r = c
d.z = i
g.p = d
g.w = i
g.t = b
assert b.x.o.o.s.y.r.t.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.t: E = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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