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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: A = None
        self.r: B = None
        self.s: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.z: G = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.s: E = None
        self.w: C = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: A = None
        self.r: B = None
        self.s: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.z: G = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.s: E = None
        self.w: C = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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