class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.q: D = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.p: G = None
        self.t: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.u: E = None
        self.t: G = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.p: G = None
        self.t: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.u: E = None
        self.t: G = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

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

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

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