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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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