class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.o: C = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
i = B("i")
e = C("e")
g = D("g")
n = E("n")
j = F("j")
f = G("f")
h = F("h")

a.r = n
a.v = i
a.w = i
i.s = n
i.z = n
i.p = g
i.o = e
i.y = j
e.y = i
e.z = i
e.w = i
e.r = i
e.q = n
e.o = f
e.v = a
g.x = e
g.r = e
g.v = h
g.u = f
g.q = f
g.t = a
g.y = a
n.x = i
n.u = i
j.z = f
j.u = f
j.y = g
f.x = a
f.z = a
f.o = a
f.v = e
f.t = n
h.z = f
h.u = f
h.y = g
assert h.u.x.w.s.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.o: C = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
i = B("i")
e = C("e")
g = D("g")
n = E("n")
j = F("j")
f = G("f")
h = F("h")

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