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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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