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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.y: C = None
        self.x: G = None
        self.p: G = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.z: G = None
        self.v: G = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.y: C = None
        self.x: G = None
        self.p: G = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.z: G = None
        self.v: G = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

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