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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.y: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.u: A = None
        self.w: G = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.s: A = None
        self.v: F = None
        self.z: E = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: H = None
        self.v: A = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: H = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.y: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.u: A = None
        self.w: G = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.s: A = None
        self.v: F = None
        self.z: E = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: H = None
        self.v: A = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: H = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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