class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.v: F = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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