class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.y: A = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.r: F = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: A = None
        self.y: G = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.y: F = None
        self.o: F = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.q: C = None
        self.w: D = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.r: F = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: A = None
        self.y: G = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.y: F = None
        self.o: F = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.q: C = None
        self.w: D = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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