class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.x: H = None
        self.t: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.w: A = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.x: H = None
        self.t: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.w: A = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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