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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.q: B = None
        self.y: I = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.s: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.q: B = None
        self.y: I = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.s: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

e.q = l
e.s = a
k.z = h
k.v = j
k.w = e
f.s = a
l.o = e
l.v = e
l.q = k
l.y = h
l.p = c
i.q = f
i.s = f
i.p = h
i.w = c
c.y = h
c.s = j
c.o = k
c.r = i
j.y = f
a.y = e
a.v = l
a.z = j
a.s = f
h.q = j
m.y = e
m.v = l
m.z = j
m.s = f
assert l.y.q.y.s.s.s.txt == "a"