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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.u: D = None
        self.t: E = None
        self.q: E = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.z: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.u: D = None
        self.t: E = None
        self.q: E = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.z: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

l.s = b
k.z = i
k.w = i
k.s = h
k.u = m
k.p = m
k.t = a
k.q = a
n.x = a
n.z = a
n.y = l
n.s = h
m.t = l
m.x = b
a.x = h
a.o = h
a.q = n
a.v = i
a.z = m
a.p = b
i.x = f
i.z = f
i.u = n
i.p = n
i.s = m
i.y = b
i.w = h
i.v = a
h.t = m
b.s = a
f.u = i
assert a.q.y.s.s.x.t.x.s.txt == "a"