class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.q: A = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.q: A = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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