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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.r: E = None
        self.p: I = None
        self.z: B = None
        self.x: B = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.u: G = None
        self.r: B = None
        self.s: F = None
        self.w: C = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

a = A("a")
g = B("g")
f = C("f")
i = D("i")
m = E("m")
h = F("h")
e = G("e")
l = H("l")
j = I("j")

a.r = i
a.p = l
a.o = l
g.s = f
g.r = l
f.t = l
i.w = a
i.x = a
i.o = h
i.u = l
i.y = l
i.z = e
i.p = m
m.t = a
m.s = l
h.s = i
h.o = m
h.r = m
h.y = m
h.p = j
h.z = g
h.x = g
h.u = f
e.v = h
l.p = g
l.r = g
l.z = g
l.y = i
l.v = i
l.u = e
l.s = h
l.w = f
j.t = a
j.z = a
j.q = m
j.o = m
j.x = h
j.v = h
j.s = f
j.w = f
j.y = g
assert g.s.t.u.v.s.o.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: E = None
        self.r: E = None
        self.p: I = None
        self.z: B = None
        self.x: B = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.u: G = None
        self.r: B = None
        self.s: F = None
        self.w: C = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

a = A("a")
g = B("g")
f = C("f")
i = D("i")
m = E("m")
h = F("h")
e = G("e")
l = H("l")
j = I("j")

a.r = i
a.p = l
a.o = l
g.s = f
g.r = l
f.t = l
i.w = a
i.x = a
i.o = h
i.u = l
i.y = l
i.z = e
i.p = m
m.t = a
m.s = l
h.s = i
h.o = m
h.r = m
h.y = m
h.p = j
h.z = g
h.x = g
h.u = f
e.v = h
l.p = g
l.r = g
l.z = g
l.y = i
l.v = i
l.u = e
l.s = h
l.w = f
j.t = a
j.z = a
j.q = m
j.o = m
j.x = h
j.v = h
j.s = f
j.w = f
j.y = g
assert g.s.t.u.v.s.o.r.s.txt == "l"