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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.x: G = None
        self.z: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.x: G = None
        self.z: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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