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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.x: A = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.x: A = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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