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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: F = None
        self.v: D = None
        self.y: G = None
        self.r: A = None
        self.u: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

n = A("n")
g = B("g")
h = C("h")
e = D("e")
a = E("a")
b = F("b")
f = G("f")
k = H("k")
c = C("c")

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: F = None
        self.v: D = None
        self.y: G = None
        self.r: A = None
        self.u: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

n = A("n")
g = B("g")
h = C("h")
e = D("e")
a = E("a")
b = F("b")
f = G("f")
k = H("k")
c = C("c")

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