class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.w: G = None
        self.u: H = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.w: G = None
        self.u: H = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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