class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.v: E = None
        self.x: B = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.u: E = None
        self.x: E = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.u: E = None
        self.x: E = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

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

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