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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: F = None
        self.p: G = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.r: D = None
        self.t: C = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

a = A("a")
m = B("m")
c = C("c")
b = D("b")
k = E("k")
n = F("n")
h = G("h")
j = G("j")
l = B("l")
i = C("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: F = None
        self.p: G = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.r: D = None
        self.t: C = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

a = A("a")
m = B("m")
c = C("c")
b = D("b")
k = E("k")
n = F("n")
h = G("h")
j = G("j")
l = B("l")
i = C("i")

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