class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.y: F = None
        self.t: E = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.txt = txt

g = A("g")
n = B("n")
h = C("h")
b = D("b")
m = E("m")
a = F("a")
i = G("i")
l = H("l")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.txt = txt

g = A("g")
n = B("n")
h = C("h")
b = D("b")
m = E("m")
a = F("a")
i = G("i")
l = H("l")
k = H("k")

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