class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.t: A = None
        self.q: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.t: A = None
        self.q: A = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

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

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

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