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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: A = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: A = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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