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

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: I = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

h.w = l
h.r = j
h.q = a
l.t = a
b.w = m
b.o = f
i.x = f
i.y = g
a.s = l
f.s = l
f.x = h
f.p = h
f.t = j
n.w = h
g.v = l
g.s = l
g.p = j
g.o = h
j.o = f
m.o = i
m.s = j
m.y = b
assert a.s.t.s.t.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: I = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

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