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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.p: D = None
        self.v: C = None
        self.q: C = None
        self.z: C = None
        self.y: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.r: F = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.w: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.p: D = None
        self.v: C = None
        self.q: C = None
        self.z: C = None
        self.y: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.r: F = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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