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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.s: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.q: A = None
        self.o: H = None
        self.v: A = None
        self.z: E = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.z: F = None
        self.w: C = None
        self.txt = txt

n = A("n")
c = B("c")
k = C("k")
g = D("g")
j = E("j")
f = F("f")
d = G("d")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.s: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.q: A = None
        self.o: H = None
        self.v: A = None
        self.z: E = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.z: F = None
        self.w: C = None
        self.txt = txt

n = A("n")
c = B("c")
k = C("k")
g = D("g")
j = E("j")
f = F("f")
d = G("d")
l = H("l")

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