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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.q: C = None
        self.o: A = None
        self.v: F = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: C = None
        self.p: F = None
        self.r: D = None
        self.y: F = None
        self.o: A = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.q: C = None
        self.o: A = None
        self.v: F = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: C = None
        self.p: F = None
        self.r: D = None
        self.y: F = None
        self.o: A = None
        self.w: B = None
        self.txt = txt

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

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