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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.x: E = None
        self.r: G = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.o: B = None
        self.q: D = None
        self.r: B = None
        self.p: A = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.q: F = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: G = None
        self.x: E = None
        self.r: G = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.o: B = None
        self.q: D = None
        self.r: B = None
        self.p: A = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.q: F = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

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

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

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